samueltpersaud samueltpersaud
  • 17-07-2022
  • Computers and Technology
contestada

If userNum1 is less than 0, put "userNum1 is negative.\n" to output. If userNum2 is greater than 10, assign userNum2 with 0. Else, put "userNum2 is less than or equal to 10.\n".

Respuesta :

rdacoder
rdacoder rdacoder
  • 17-07-2022

Answer:

I don't know what language you want this in, but I will do it in c++. Let me know if you want it in another language.

if (userNum1 < 0) {

 cout << "userNum1 is negative" << endl;

}

else if (userNum2 > 10 {

 userNum2 = 0;

} else {

 cout << "userNum2 is less than or equal to 10";

}

Answer Link

Otras preguntas

Which of the following statements is true about the outbreak of World War II in Europe? World War II began as a result of the growth of fascist dictatorships in
Why do you think the battle of Trenton is considered a turning point in the revolutionary war?
compare and contrast the bones of a bird's wing and a seals flipper
Botanical name of waterleaf
Sharon measured two apples. The green apple weighed 3/8 pound. The red apple weighed 1/3 pound. Which Apple was heavier? Write an inequality to show how their w
Solve by the linear combination method (with or without multiplication) 6x-2y=2 -3x+4y=5
what is the total cost of $ 2.95 notebook plus 5 %
Which verb correctly completes the sentence? He __________ them there every day. a. see b. sees
what is the noun form of issue
Which Renaissance artist also filled notebooks with plans for flying machines and armored cars, observations of plants and animals, and anatomical drawings of t