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

n which stage does the author show how the story ends?
Mary anticipates coming into contact with the blood and body fluids of a patient. To protect herself and others from potential infectious diseases, she must wea
Which expression is equivalent to 121-x^2
seven milion twenty thousand thirty-two in standard form
3x-12+10=8-2x what does x equal?
which of the following statements about peer presure is true a.peer pressure is always verbal b. peer pressure is the only reason teenagers get into drugs c.som
what is formed by changing the number of neutrons in an atom
calculate the volume of a tin block that has a mass of 95.04 grams at stp
what obstacles do health scientists have to overcome to use artificial body organs and body parts ?
what is 1.8 repeating, rounded to the nearest hundredth?