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

Which of the following were members of the aristocracy in Byzantine society? A shopkeepers B small-scale merchants C soldiers D wealthy landowners
What would be numbers if you ring 10 more than 36?
greta made a design with squares.she colored 8 out of the 12 squares blue.what fraction of the squares did she color blue? Thank you
Why were native Americans forced to abandon their land and move west
I am part of a whole. I am less than one-half but greater than four tenths. I am a decimal with the digit 2 in my hundredths place. What number am I?
What is the second part of Zhou dynasty
6. Which of the following cell types is a haploid A. Liver cell B. Somatic cell C. Sperm cell D. Germ cell explain why
why did the federalist a have more support than the Antifederalists?
Which ordered triple is a solution of the following linear system?: 3n = -18 3m - 2n + 4p = 12 2m - 4n = 16
Discuss what variables are used to describe weather