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 is 7mn multiplied by 5m squared n
What is 9plus9plus3plus7plus4plus6plu4plus5plus7plus3plus6
when stock prices began to fall in the United States how did Americans react
choose a numbr from 10 to 90. write to show the number that are10 less and 10 more than your number
Briefly explain the difference between irony and foreshadowing.
1.The united nations only uses troops and trade embargoes to back the declaration of human rights. 1. true 2.false The universal declaration of human rights e
Jimmy Carter was governor of Georgia from 1971-1975. He was DIFFERENT from previous governors because he A) had little political experience. B) strongly s
Which of the following decisions cannot be made at the margin? a. whether to move to Boston from Chicago b. whether to spend the day on Saturday watching movi
simplify these expressions
49/6 into a mixed number