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

two identical freight cars roll without friction towards each other on a level track. one car rolls 2 m/s the other 1 m/s. after the cars collide they couple an
How is the numeral 35.012 written in words and why
A child is standing across the street from his apartment . His mother is on their balcony . The angle of elevation between the child's eyes and his mothers eyes
A pound of seedless red grapes costs $2.75. Drew must spend less than $9.35 on a bunch of seedless red grapes.Inequality:Solution:Interpretation:
in what ways is climate controlled by the sun and the water cycle ?
in an expression(8/9) squared (-81)+3/5dividedby-9/10
.is a pot holder a conductor or a insulator
A child is standing across the street from his apartment . His mother is on their balcony . The angle of elevation between the child's eyes and his mothers eyes
What two major processes are involved in the oxygen cycle?
How is the numeral 35.012 written in words and why