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

in a geometric series t1=23,t3=92 and the sum of all of the terms of the series is 62813. How many terms are in the series
What is the state at which a net force is zero called
The accompanying frequency table indicates the grades on the math midterm in Ms.Dennis' class. In which interval does the median of the date lie?
@stewyWhich sentence uses a verb that agrees with its compound subject?     A.Waiters and waitresses serve the diners at the banquet.B.cell phones and tablets i
Write down a sensible metric unit for measuring A) the distance from London to Paris B) the amount of water in a swimming pool
how did jazz demonstrate the independent spirit of the times?
algae do not cause disease or not
A rocket is launched from the ground. The function  h(t)= -4.9t^2 +180t   models the height of a rocket launcher from the ground t seconds after it is launched.
Can someone help me please got to be in tomorrow
n^2+7n+15=5 show work please