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

What can you do to help protect the environment? What can your classmates do? What can the community do? What will happen if we take no action to protect the en
Who played a significant role in the construction of the Wilderness Road?
30-6a<-3(5+7a) how do you solve this?
What is 8-6g+15=19 step by step
Contrast elastic potential energy and chemical potential energy
What was Spain's strategy for developing Texas?
The coordinates of a square are (1,8) (7,8) (7,2) and (?,?)
What is the function notation of y=2x+7
Which of the following was true of the Know-Nothing party? A. It rejected nativism. B. It focused on containing the expansion of slavery. C. It wanted to und
What was the main provision of the Monroe doctrine?