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 two conditions must exist in order for radiation to occur?
Choose the sentence that correctly uses pronouns. Demetri and me would like to travel. Maybe he and I will go to Spain together. The librarian showed we some
can someone please help? will give brainlest!
Help Please please please ​
ellie buys a mobile phone in spain €352.50 her brother jack buys an identical phone in japan for ¥39856 work out how much it is in £
louie company has a defined benefit pension plan. on december 31 (the end of the fiscal year), the company received the pbo report from the actuary. the followi
What are the 3 contributing factors to ecological succession
PLEASE ANSWERRRRRRRRRRRRRRRRRRRRR
Sally will earn $30 for every 5 hours that she babysits. Which of the following equations can be used to represent the proportional relationship?
How many valence electrons does bromine have