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 the figure, a∥b and m∠6 = 146°. What is the m∠2 ? Enter your answer in the box.
Which equation represents the proportional relationship in the table? A: c=r+3 B: c=1/3r C: c=3r D: r=3c
What would happen if the parent cell were to divide more times than usual during mitosis
The formula for the hypotenuse of a right triangle with legs of length a and b is shown. What is b in terms of a and c?
What caused the economic panic’s in the 1800s
please graph w=25t + 600​
Evaluate x2/y + x2/z for x = 6, y = -4, and z = -2.
Evaluate the following expression:
han is riding at a consrant speed of 16 miles per hour.write an expression that shows how many miles han has gone after t hours​
AP HISTORY PLEASE HELP What did the women’s movement, Hispanic movement, American Indian movement, and gay rights movement all have in common with the Civil Rig