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

If a - 3= 7, then 2a - 14 =
what are the functions of the sweat and oil glands
what is the common name for calcium silicate?
Explain 2 different ways to find the greatest common factor of 15x2y3  and 24x4y2 .
Why Do We Sweat? Need some help
you are planting a rectangle garden. it is 5 feet longer than 3 times its width. the area of the garden is 250 feet. find the dimensions
3)    Write an equation for a graph that is the set of points in the plane that are equidistant from the point  F(6,0) and the line x = -6.
What is Taurine? Please help :)
What does "to see the elephant mean"?
A cone has a diameter of 8 cm. and a height of 4cm.   If the height doubles then the volume is: a) four times largerb) three times as largec) Twice as larged) T