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

Select the correct answer. 1 Ben works as an accountant at a shipping company. While managing the financial invoices, he noticed that there was a tax that his c
Use and misuse of mobile phone essay
5. During the night, a child hide himself at the corner from his mother who wanted to bit him. The mother came with a torch calling him, but the child could onl
54321 code in english language​
underline the noun clause in each sentences chose the gift for whom ever you want​
what is mean of french​
Based on the cartoon, which conclusion can be drawn about colonial concerns toward English policies? A Colonists support an increase in taxation by the British
In your opinion, how frequently do you believe that you might have to respond to a conflict situation? in penitentiary settings
What are behaviors that make up good public speaking?
Can you recommend the best Indo Chinese restaurant in Heathcote Valley?