subject

1)create a conditional expression that evaluates to string "negative" if userval is less than 0, and "positive" otherwise. example output when userval = -9 for the below sample program:
-9 is negative.
#include
#include
int main(void) {
char condstr[50] = "";
int userval = 0;
userval = -9;
strcpy(condstr, /* your solution goes here */);
printf("%d is %s.
", userval, condstr);
return 0;
}
2)
using a conditional expression, write a statement that increments numusers if updatedirection is 1, otherwise decrements numusers. ex: if numusers is 8 and updatedirection is 1, numusers becomes 9; if updatedirection is 0, numusers becomes 7. hint: start with "numusers = ".
#include
int main(void) {
int numusers = 0;
int updatedirection = 0;
numusers = 8;
updatedirection = 1;
/* your solution goes here */
printf("new value is: %d
", numusers);
return 0;

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:00
What are procedures that keep a data base current
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
question
Computers and Technology, 23.06.2019 14:00
Need ! will choose brainliest! discuss the role of abstraction in the history of computer software.
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. this can be done by normalizing to values between 0 and 1, or throwing away outliers. for this program, adjust the values by subtracting the smallest value from all the values. the input begins with an integer indicating the number of integers that follow. ex: if the input is 5 30 50 10 70 65, the output is: 20 40 0 60 55
Answers: 1
You know the right answer?
1)create a conditional expression that evaluates to string "negative" if userval is less than 0, and...
Questions
question
Mathematics, 04.06.2021 18:30
question
Physics, 04.06.2021 18:30
question
English, 04.06.2021 18:30
Questions on the website: 13722363