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

WILL GIVE BRAINLIEST IF ANSWERED FAST!!!
What is the temperature of the triple-point of water on an absolute scale whose unit interval size is equal to that of the fahrenheit scale?
WILL GIVE BRAINLIEST IF ANSWERED FAST!!!
explain how trade leads to increased interdependence between countries
4 important details that establish john lewis character/morals
Rewards and Punishment examples
what is the lcf of 4 and 5
WILL GIVE BRAINLIEST IF ANSWERED FAST!!!
An airplane is preparing to land at an airport. It is 51,300 Feet above the ground and it is descending at a rate of 3100 feet per minute. At the same airport,
A model of a dinosaur skeleton was made using a scale of 1 in : 15 in in a museum. If the size of the dinosaur's tail in the model is 8 in, then find the actual