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

Synergistic benefits can arise from a number of different sources, including operating economies of scale, financial economies, and increased managerial efficie
Pls help!! Thank you sooooo much if you help me on this, pls show proof
Passage 1 Jackie Robinson began his professional baseball career in 1945 with the Kansas City Monarchs, one of the leading teams of the then-separate Negro Leag
write some point on ideal environment ​
Of the following points, name all that lie on the same horizontal line? (1,-2) (-1,2) (-2,1) (2,-1)
Let x and y be real numbers satisfying 2/x=y/3=x/y Determine the value of x^3
Match the items. The task is to match the lettered items with the correct numbered items. Appearing below is a list of lettered items. Following that is a list
Simplify 3 (2x + 1) - 2 (x + 1)​
Can the following question be considered a statistical question, and why? How many hours are people watching movies each week?
If the amount of daylight increases plant growth during the summer