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

Humans always have a negative impact on the environment ?TRUE or FALSE ?
Could life as we know it exist on earth if air contained only oxygen? Explain What would happen to the supply of atp in your cells if you ate to few carbohydrat
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
What is 24÷689= show work
what is the general name for policies that affect the welfare, or well-being, of the people
the _______ is where the geosphere meets the ocean
What is one significant contribution from African Americans on American society and/or culture?
In which of the sentences below is the shift in verb tense acceptable?Check all that apply. A.By the time I returned home three hours had passed. B.Though the w
What would be the second step in simplifying the expression 4 2 ÷ (2 • 9) + 5?multiplydivideaddexponent
How do you write 6,007,200 in expanded form