tashaunalewis574 tashaunalewis574
  • 24-11-2021
  • Computers and Technology
contestada

What is the output of the statements below? int a = 10; int b = 20; int count = 0; if (a > 5) if (b > 5) { count ++; } else count = 7;

Respuesta :

ratedgibbon216 ratedgibbon216
  • 24-11-2021

Answer:

The output of count would be 1.

Explanation:

The first if statement is true. Since 10 > 5

The second if statement is true. Since 20 > 5

So,

count ++;  // That increments the variable count by 1

the else statement is not provoked since the if statements were correct.

Answer Link

Otras preguntas

which protestant reformer split from the catholic church tro form a theocracy in geneva
Identify find a problem with using the sentence in a research paper. Jones said “I believe unquestionably in taxation. “ smith replied “well, I don’t. I think
the sum of three consecutive even integers is 258. write an equation and solve to find the integers
I need help ! Are these correct?????? I’m
this week leah three as much as she did last week. During both weeks leah earned $72. how much did she earn last week?
The following image shows a cell before and during the process of mitosis. Before it undergoes mitosis, the cell contains 2n chromosomes. A division happens in
How did Marco Polo impact relations between Europe and China
How would I do this ?
Which function rule would help you find the values in the table j k 2 -12 4 -24 6 -36 8 -48 A. k = -12j B. k = -6j C. k = j - 12 D. k = j
what is cyranos rationale fo standing up to men like Count de Guiche even though in doing so he may impede his own position in the world?