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

cost A=0.6489 take the inverse cosine of both sides
What ordered pair describes the location of point P?
Find the greatest common factor of 16 and 45
Combien de pantalons est-ce que tu as?
What is AT (Automatic Thoughts)?
y does a wolf need 2 eat many rabbits 2 survive?
Who was the leader of an Axis power during World War II? a. Mackenzie King b. Benito Mussolini c. Winston Churchill d. Charles de Gaulle
How do i do this please help
What number is 1/10 the value of 237
at a lunch stand, each hamburger has 50 more calories than each order of fries. if 2 hamburgers and 3 orders of fries have a total of 1700 calories, how many ca