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

What is SAT? From which countries can you take the SAT? In the SAT exam, is there any possibility of translation?
divide this please 3⁄5 ÷ 1⁄5 =
Can someone pleaseee help me out
What is the area of a sector with a central angle of 5π6 radians and a radius of 5.6 ft? Use 3.14 for π and round your final answer to the nearest hundredth.
What are the social organizations work in Nepal and function​
Help! the file is attached
Which of the following is a function of the spleen? a. Cleanses the interstitial fluid b. Circulates the lymph c. Removes worn out red blood cells d. Stores pla
prove that tan2A is equal to 2tanA/1-tan^2A
Lee la frase y escribe la forma correcta del verbo en paréntesis. Read the sentence and write the correct form of the verb in parenthesis. You may copy and past
In India, nearly 70 percent of the population live in villages, where most of them - in what type of economic activity?