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

Lisah, Inc., manufactures golf clubs in three models. For the year, the Big Bart line has a net loss of $10,000 from sales $200,000, variable costs $180,000, an
¿De qué nuevas maneras se puede comunicar el ser humano en la actualidad?
What is -25/7 + 2/3 - 2 1/2=
solve please! also if you could show me how you got the answer.
3(a− 6) = −5a− (7 + 3a)
Which of the following statements is true of physical rehabilitation facilities? 1. They are a common destination for people who have limited ability to travel.
Who help most control in Europe from the 1500s to the 1700s?
How hard can you yeet someone
Which organelle is like the brain of the cell? vacuole endoplasmic reticulum cytoplasm nucleus
place the capitals of Georgia in the right order