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

which of the following was a long-term result of the black death in medieval europe A. muslim armies were able to conquer the weaker european kingdoms B. the po
Admission for a state fair is $10, and each ride ticket is $2.50.Write an expression to represent the situation.
Lewis fills his thermos with 2 liter of water. Garret fill his thermos with 1 of water. How many more milliliter of water does lewis have than Garret?
what is the equation of the following line?​
The data sets represent the five starting players of four basketball teams. Order the teams from least to greatest based on the mean height of the teams. 69,68,
How many dogs it takes to fill a room up?
x + 3y = 3 2x + y = 11​
a source that is written or created by a person who expirenced an event personally is called a
What whole number comes right before 105?
How many moles of compound are there in the following? a. 6.60 g (NH4)2SO4 b. . 4.5 kg Ca(OH)2