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
Which of the following statements expresses why the following code is considered bad form? for (rate = 5; years-- &gt; 0; System
OlgaM077 [116]

Answer:

l and ll only that is the answer

7 0
3 years ago
Read 2 more answers
Jenae helps maintain her school web site and needs to create a web site poll for students. Which tool will she use? JavaScript H
irga5000 [103]

Answer:

Text Editor

Explanation:

What the question implies is that, what tool will she need to create the website.

And the answer is a text editor; this is so because the other three options are web development languages used in developing a website but the text editor is where she'll write her line of codes to create the required website poll.

Example of usable text editors are notepad and notepad++ etc.

4 0
3 years ago
Read 2 more answers
Create a cell reference in a format by typing in the cell name or
Neko [114]

Answer:

D. Create a cell reference in a formula by typing in the cell name or clicking the cell.

Further Explanation:

To create a cell reference in a formula the following procedure is used:

First, click on the cell where you want to add formula.

After that, in the formula bar assign the equal (=) sign.

Now, you have two options to reference one or more cells. Select a cell or range of cells that you want to reference. You can color code the cell references and borders to make it easier to work with it. Here, you can expand the cell selection or corner of the border.

Again, now define the name by typing in the cell and press F3 key to select the paste name box.

Finally, create a reference in any formula by pressing Ctrl+Shift+Enter.

6 0
2 years ago
In programming, what is a string?
Alla [95]

A way to store a sequence of letters, numbers or symbols.

This is the most accurate statement, though not entirely true.

Hope this helps.

7 0
3 years ago
Read 2 more answers
1. Digital videos look sharpest when they are displayed at a resolution that is larger than the frame size.
boyakko [2]

Answer:

(d) all of the above

Explanation:

This is because, not only is digital video a core technology for digital television, it also happens to be a core technology for video conferencing and video messaging. This could be seen in its application in messaging apps for private discussion of for holding official meetings between employees in virtual conference.

8 0
2 years ago
Other questions:
  • Which step can most directly help your team follow up on decisions made during Web development meetings?This task contains the r
    6·1 answer
  • Which term describes the process by which light passes through an object or a medium.
    7·2 answers
  • The _____ dialog box lets you specify which files are to be merged.
    14·1 answer
  • _______ is a communications protocol used to send information over the web. HyperText Markup Language (HTML). URL (Uniform Resou
    10·1 answer
  • Set methods are also commonly called _____ methods, and get methods are also commonly called _____ methods.
    6·1 answer
  • 4. What are the ethical issues of using password cracker and recovery tools? Are there any limitations, policies, or regulations
    5·1 answer
  • You are required to copy in your attendees' emails from outside of Outlook when creating a meeting
    6·2 answers
  • Ew<br>subject: Computer<br>11101÷101<br> binary operations<br>​
    7·1 answer
  • Case Study/Scenario: First, Julio clicks Tools from the Chrome menu on the toolbar. Next, he looks for Manage Add-Ons but can no
    9·1 answer
  • How are mathematics and computer science similar? Discuss any connections between numbers, logic, and other elements.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!