1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Whitepunk [10]
3 years ago
15

1)Create a conditional expression that evaluates to string "negative" if userVal is less than 0, and "positive" otherwise. Examp

le 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;
Computers and Technology
2 answers:
SSSSS [86.1K]3 years ago
7 0
1. userVal < 0 ? "negative" : "positive"

2. updateDirection == 1 ? numUsers++ : numUsers--;
Licemer1 [7]3 years ago
5 0

Answer:

1:

if userVal<0

cout <<" negative":

userVale >0

cout<<"positive":

2:

if

updateDirection ==1;

numUsers++;

cout<<"numUser"

else

numUser--;

cout<<"numUser";

You might be interested in
You interact with a program through which of the following, thereby controlling how you enter data and instructions and how info
kaheart [24]

Answer:C)User interface

Explanation: User interface(UI) is the interaction phase of the user or programmer with the computer system and network. This phase helps the user to connect with the operating system function and let them process it according to the requirement. Example-monitor , keyboard, mouse etc.

Other options that are given are incorrect because operating system is the system that is part of the interface , information is the data and storage is for the storing of data,.Thus the correct option is option(C)

4 0
3 years ago
Read 2 more answers
My current lesson is The Excel Screen and Worksheets and the question is:
Usimov [2.4K]
I can't tell you the answer without a picture, but to find the answer yourself: Go straight up from the cell containing 'Activity Questions' this will tell you a letter such as B. Go directly across to the left of the cell containing 'Activity Questions' this will tell you a number such as 3. The name of the cell I used as an example would be called B3.
3 0
3 years ago
Um?<br><br> i went to check my questions and i found this-
asambeis [7]

Answer:

just go ahead and refresh the page

Explanation:

5 0
2 years ago
A cookie is.... a. an illegal use of information about a customer b. a feature of a Web site designed to attract children c. a f
Elodia [21]

Answer:

C. A file that a Web site stores on a visitor's computer

Explanation:

Have a nice day! :)

3 0
2 years ago
What does MMF2 use to measure an object's position in the play area?
DerKrebs [107]

Answer:

The X and Y coordinates of the object's hotspot

Explanation:

MMF2 is simply known in full as Multimedia Fusion 2, and it is a visual programming tool that was developed by the ward winning software development group known as Clickteam. The programing tool which was made after Multimedia Fusion 1.5 allows for the creation of applications and games.

The tool is built in such a way that the X and Y coordinates of the object's hotspot are rightly used to measure the position of an object in the play area.

3 0
2 years ago
Other questions:
  • Use the image below to answer this question.
    14·1 answer
  • Two types of formulas in Excel, what are they? A. Complex and simple, B. General and currency, C. Logical and Boolean, D. Trig a
    15·1 answer
  • While troubleshooting a network connection problem for a coworker, you discover the computer is querying a nonexistent DNS serve
    13·1 answer
  • Think back on the Font Tester App. Can you think of an example of another app or feature of an app which would use a loop to con
    14·1 answer
  • True or False? Using your traffic analytics report, you can see the source of traffic to your website
    13·1 answer
  • 1. What does the word “processing” in data pro- cessing mean?
    13·2 answers
  • A school has an intranet for the staff and students to use. Some of the files stored on the intranet are confidential. Give two
    15·1 answer
  • Of the following field which would be the most appropriate for the primary key in a customer information table?
    5·1 answer
  • How to scan a screenshot on Brainly?
    9·2 answers
  • Write a function called st_dev. st_dev should have one
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!