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

What’s the surface area
What is the measurement of RST
Can someone answer this question please answer it correctly if it’s corect I will mark you brainliest
8x - 2y = 6 and 3x + 3y = -24. What is your answer?
BUSCO AMIGA O AMIGO
Solve solve solve solve please
When in the Course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another, and to assume am
Which statement best describes how propaganda reinforces one of the themes of Animal Farm in this passage?
Can anyone help me with this, please? ​(U.K. law)
Demarco has a piece of fabric 6 yd long . He a piece 3 yd long. He cuts the rest into strips that are each 3/4 yd long. How many 3/4 yd long strips are there? S