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

why are authoritarian and totalitarian systems considered unlimited governments
hich word group is a complete sentence?   A. Birds nest in the tree.   B. An old barn with a tractor inside.   C. Six inches of water in the basement
What does Newton's second law of motion state
how were all the new England colonies similar to each other?
It we start with 0.98g NaOH, how many moles of NaCl should we make? How many grams of NaCl should we make?
conjunctions and prepositions can be interchanged. true false
How do u spell homograph?
What is 837 divided by 36 ? (not on calculator)
I need help with the problem
How many ways can you reflect ABCD onto itself