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
Grace [21]
3 years ago
8

Print 'userNum1 is negative" if userNum1 is less than 0. End with newline Convert userNum2 to 0 if userNum2 is greater than 9. O

therwise, print "userNum2 is less than or equal to 9:. End with newline 3 int main(void) 4 int userNuml; S int userNum2; 6 7 userNum1-1; 8 userNum2 7 10 if (userNum1) printf "userNum1 is negative.n 12 13 if(userNum2-9 14 15 16 17 print f("userNum2 18 19 return ; printf("userNum2 is less than or equal to 9.\n; Your solution goes here is%d.\n", use rNur?); 20 Check Try again x A possible solution uses an if statement for userNum1, and an if-else statement for userNum2 x Testing for correct output for userNum 1 = 0 and userNum2 = 10 Output differs.
Computers and Technology
1 answer:
dlinn [17]3 years ago
8 0

Answer:

#include <stdio.h>

int main()

{

   int userNum1;

   int userNum2;

   

   userNum1 = -1;

   userNum2 = 7;

   

   if (userNum1 < 0)

       printf("userNum1 is negative. \n");

       

   if(userNum2 > 9)

       userNum2 = 0;

   else

       printf("userNum2 is less than or equal to 9.\n");

   return 0;

}

Explanation:  

Initialize userNum1 and userNum2.

If userNum1 is less than 0, print 'userNum1 is negative" and end with newline.

if userNum2 is greater than 9, assign 0 to userNum2.

Otherwise, print "userNum2 is less than or equal to 9 and end with newline.

You might be interested in
Which peripheral device is used to record sound?
faust18 [17]

he will need a microphone, it is a recording device.

8 0
3 years ago
Read 2 more answers
I’m so lost. which username do i do.
koban [17]

Answer:

the username you feel like using

5 0
3 years ago
Read 2 more answers
Every computer consists of physical components and nonphysical components. the nonphysical components of a computer that underst
IrinaVladis [17]
Physical component means Computer Hardware which you can touch and non Physical component means Software, which you can not touch. nonphysical component designed specially for physically component. like Microsoft company designed Software according the Hardware for example Microsoft windows 64 bit could not install on which 32 bit Architecture Hardware.
7 0
3 years ago
The database structure in a dbms is stored as a _____.
Colt1911 [192]
This will be stored as a collection of files
6 0
3 years ago
What linux command displays the ip address and subnet mask?
Nookie1986 [14]
Type "ifconfig" at the terminal prompt, then press the "Enter" key. The IP address is labeled as "inet addr." The subnet is labeled as "Mask."

step 2

Type "netstat -r" at the command prompt, then press the "Enter" key to view the gateway address.

3 0
3 years ago
Other questions:
  • When pasting an object which has been copied from a different slide, where on the slide does the object paste, assuming nothing
    15·1 answer
  • Is a way of grading web pages by the number of other web pages that link to them?
    10·1 answer
  • To use files in a c++ program you must include the ________ header file.
    15·1 answer
  • Look at the following form. Which input method is the form using to receive the user's favorite activity? What is your favorite
    12·2 answers
  • what notation system supports presenting the largest numbers using fewest digits; Binary, decimal or hexadecimal?
    11·1 answer
  • This week you will learn about basic code structure. The term structure, as it relates to programming, refers to the decisions y
    14·1 answer
  • Define Indentation
    8·1 answer
  • You can insert video by clicking video drop-down menu on the ______ tab.
    15·1 answer
  • You are writing a program to help compare two sports teams. A sample member of the list scores is [2. 5] where your team scored
    5·2 answers
  • When an EC2 instance is being modified to have more RAM, is this considered Scaling Up or Scaling Out?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!