kiaraahquin9491 kiaraahquin9491
  • 02-09-2019
  • Computers and Technology
contestada

. What is the output of this code sequence?

for ( int i = 5; i >= 0; i-- )

System.out.print( i + " " );

System.out.println( );

Respuesta :

NanaDwumor
NanaDwumor NanaDwumor
  • 02-09-2019

Answer:

5

4

3

2

1

0

Explanation:

The boolean expression is true from i=5 to i=0. This makes it 6 times.

The System.out.print will leave cursor on same line after printing. However System.out.println() will print a blank space and move to next line. This makes output to be arranged vertically.

Answer Link

Otras preguntas

Which of the following is a claim?
ryan wants to buy a sweatshirt for $42.99. The sale tax rate in his city is 7 1/2% what is the total cost for the sweatshirt? round your answer to the nearest c
Which three elements have the most similar chemical properties? 1. Ar, Kr, Br 2 K, Rb, Cs 3. B, C, N. 4. O, N, Si
1 3 y = -x - 4 2 What is the h value
3. 200 × 38.4 = 4. 900 × 20.7 = help please it has to be solved like this 400*45.2=400* 45+400*0.2=18000+80=18080
14^6×15^5÷35^6×6^5can anyone help me to solve this question​
You want to clean a 500-ml flask that has been used to store a 0.9M solution. Each time the flask is emptied, 1.00 ml of solution adheres to the walls, and thus
Give examples of three paramedic plants
Solve 1+1/2(y−2)=3/2x for y. Then tell whether x and y show direct variation.
Which group of words shows us how Mr Bell felt when he saw the umbrella?