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

What does the Federal Reserve use to help control the money supply in the economy as a whole? a. checks b. stocks c. interest rates d. debit cards
If you leave a solar powered flashlight in the sun for 8 hours, it will be able to stay lit for 3 hours. What would happen if you placed the flashlight under a
How does collecting biomass affect the environment?
Which term refers to the use of strength to hold the body's position? a. agility b. balance c. power d. speed
I' am lost on this one please help
Help me plzz need help on this question
Classify the number as rational or irrational. Select Rational or Irrational for each number. Rational Irrational 0.15783456 −200−−−√ 419 0.23¯¯¯¯
What factors can put a child at elevated risk for abuse?
Which statement is true about the data set?
Younger and older widows generally experience similar grief processes. a. True b. False