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 a phenotype? * The genetic makeup of the individual The expression of a trait; PHysical appearance An organism that has the same genes for a trait (exam
Fill in the blank with the word or phrase that best completes the sentence. Homines nec pellem nec _______ habent.
How do i solve this math question? d/2=4 I do not fully understand.
Which group of organic compunds store energy for long periods of time
What is biological method
Legalism, Confucianism and Daoism are Chinese philosophies, not religions A= true B=false
Pls help me with this math please and thank you
What is it about dna that makes it so easy to make a copy of it over and over again
What did shays rebellion show America about its government under the articles of confederation
Kayden is going to invest $2,100 and leave it in an account for 13 years. Assuming the interest is compounded monthly, what interest rate, to the nearest tenth