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

help me for brainliest answer
A tall cylinder contains 30 cm of water. Oil is carefully poured into the cylinder, where it floats on top of the water, until the total liquid depth is 40 cm.
Can u please answer this question in the picture below or above I guess
In a hydraulic lift, if the pressure exerted on the liquid by one piston is increased by 100 N/m2 , how much additional weight can the other piston slowly lift
Which is not a basic function of a cell? A. Breaking down molecules B. Making macromoleclues for an organism C. Maintaining a stable external environment D. Rem
Which image shows a nonrenewable resource?
In three separate site-directed mutagenesis experiments, scientists altered a catalytic Lys residue in corn PEP carboxylase to an Asn, Glu, or Arg. Which substi
Which values for h and k are used to write the function f(x) = x2 + 12x + 6 in vertex form? h=6, k=36 h=-6, k=-36 h=6, k=30 h=-6, k=-30
What is the rhyme scheme?
How many years would it take for Jughead to save an adequate amount for retirement if he deposits $2,000 per month into an account beginning today that pays 12