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

1) Based on the information in the graph, which inference is the most reasonable? A) By 2030, the demand for renewable energy will exceed global energy demand.
how does culture affect communication\ explain
Rewrite y=x^2-10x-6 in vertex form.
Help me I will give extra points
Explain why the ratio 3ft./1yrd. has a value of one
is nonflammable a physical or chemical property
what is profession education​
10 points!!! Given the scenario below, decide which answer best describes the type of graph shown Alice has created a graph that shows the change in temperature
どうぶつの森 ポケットキャンプ 新クッキー「ジャックのアンティーク図書館 Que es esto
A. Mary Kay is a … a Printmaker b Sculptor c Photographer d Painter 3. What are 2 elements of design? Balance and Emphasis Painting and printmaking Brushes and