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

Dax and his friends start a fundraiser to help residents who lost their belongings.In the first week, they raise $360, which is 30% of the total amount that the
Natural selection is a mechanism that acts on individuals within a population. Which is a result of the process of natural selection?
PLEASE GUYS I NEED HELP NOW I WILL GIVE BRAINLEST TO FIRST CORRECT ANSWER PLEASE IS WORTH A LOT OF POINTS PS!!!!!!!!!!!!1 SHOW WORK A box with a volume of 864
Determine how many solutions exist for this system of equations: −6x−2y=10y=−3x−5 A Infinitely many solutions B Two solutions C One solution D No solution
13 mins left oh gees oh gosh
write a poem about points
look at the images please help
Graph the function; f(x) = -x + 6 with a minimum of three function values. In the list of function values, include the value for which the function intersects t
Here’s a graph of a linear function. Write the equation that describes that function. (Zoom in if blurry) (Express it in slope-intercept form.)
Use row operations to solve the system. x + y - z = -3 3x - y + z = 11 x - 4y + 2 = -14