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

Monetary policies adjust the amount of money in circulation True Or False
PLEASE HELP! I need help with these algebra 2 questions. (60 points) 1. Solve for x x^2+6x+11=0 2. Find the vertex and axis of symmetry f(x)=2x^2-16x-17 3. Give
Chemistry, please help! Thanks. Based on E⁰ values, which of the following metals is the most easily reduced? a. mercury b. sodium c. zinc d. gold
what is the sum of 2/2 plus 3/3 represent your answer with multiple ways
What is the anachronism
¿A qué hora __________ la pelicula? (4 points) Question 8 options: 1) empieza 2) empiezas 3) empezamos 4) empiezan Question 9 (4 points) Question 9
Can someone please help me with this Geometry asap, thanks!
Adhesion proteins and integrity are involved which of the following functions? 1. Providing traction for the movement of cells 2. Cellular differentiation 3. Fo
Which one is correct?
Describe the relationship of the atoms shown by: ch4(g) + 2o2(g) → co2(g) + 2h2o(g)