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

Read the sentence. Not everyone is aware of the fact that, with a small amount of research, it is possible to find many of the most popular products people all
Please help, I will give brainliest!!!The table models the flight of the projectile from Part AWhich of these statements is true?A) h(4) < h(20)B) The flight
1. Which change is an environmental effect of building dams? A) weed growth upstream B) increased fertility downstream C) increased water temperature upstrea
Identify behaviors that can help prevent accidents. What are some things that you can do to avoid accidents? In the case of an accident or emergency, how would
pleaseeee help i don't understand how to do this
can someone help me please!
Which statement is directed at readers who disagree with the author’s ideas about nature?
because there was no written record of the village history, the stories of the griots became the history and the only record of past events. Griots often kept r
Fill in the blanks WILL MARK BRAINLEST
GIVING BRAINLIEST ONLY IF CORRECT