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

2396473 rounded to the nearest ten thousand
Using a flowchart, describe why the concentration of DDT in ring seals is much higher than the concentration in the arctic cod?
what evidence from the text supports the idea that Lady Macbeth questions her husband's ability to kill the king
help me please,i struggle with this concept!
Each time you make a choice that goes against your own values, you make a deposit in your self respect account
What effect did trade along the Silk Road have on the world around 1000 CE? Select two that apply.
According to Einstein's special theory of relativity, in which frames of reference will all laws of physics apply? A. Within any frame of reference that is not
In your own words explain the difference between the possessive adjectives used for "our" as compared to other possessive adjectives in Spanish.
Why do people leave there home to star in a foreign country
voy a la playa para el sol