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

Conveyor belts called grain elevators are used to move grain into a silo. Answer the following questions knowing that the lower end of the belt is 100 feet from
Can someone help me please with this having trouble doing it!!
Conveyor belts called grain elevators are used to move grain into a silo. Answer the following questions knowing that the lower end of the belt is 100 feet from
Find the volume of the triangular prism. 10 cm 8 cm Volume = 12 cm [?] cm³ ​
8. P₁V₁ = P₂V₂ T₁ T₂ Rewrite this expression to find T₂.
How many strands will each new DNA molecule that is created during replication have?
If the average work week was 43 hours in 2009 and 42 hours and 30 minutes in 2010, by what percentage did the average number of hours worked per week drop from
Another title for a carer is
What is 72 decreased by 32%
Linear functions f(x) and g(x) have been combined by addition and multiplication. The table shows values for the sum, s(x), and product, p(x). Which statements