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

Shortly after landing on the shores of Mexico, the Spanish conquistadors came into contact with which native people? A. Olmec B. Apache C. Incas D. Aztecs
What parts of society were segregated
Which of the following is not a required part of introductory paragraph? Question 10 options: hook specific details thesis transition
The Embargo Act meant an end to _____. shipping of goods to and from Europe transporting slaves to the United States importing goods manufacturing goods in the
A father who grabs and removes a child immediately when a big dog is approaching will most likely teach the child this emotional reaction.
compare and contrast why did the countries of South America fall to dictatorships and disorganization while the United States became a strong democracy
read the following sentence from a cover letter
Now find the magnitude of the force on an electron placed at point p. recall that the charge on an electron has magnitude e=1.60×10−19c
4 steps in developing a brand name
Did the Virginia plan favor larger or smaller states?