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 is the measurement of the missing angle?
three things that you will not do when your driving?
Find the percent increase: 24 to 36
HELP.... square root of y5
Under what conditions might a northwest Indian tribe look to a single leader as source of authority A. Plenty B. Famine C. War D. Drought
make a table that shows the distance traveled every half hour,up to 5 hours,if bikers ride at this constant speed
Someone help me please
There are 80 sixth graders, 90 seventh graders, and 70 eighth graders at your school. Every student gets entered in a raffle. What is the probability that a sev
Working for ok titan sports, donna makes an annual salary of $29,400. what would her gross pay be if she were paid weekly?
At what points does the curve r(t) = ti (6t − t2)k intersect the paraboloid z = x2 y2? (if an answer does not exist, enter dne.)