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 point lies on the graph of the boundary line of the inequality 3y + 4x< 12
if the proper dosage of a drug is 2.0mg/kg of body weight, how many milligrams (mg) of the drug would a 110 lb individual need? (5%)
How do you use equal protection of law in a sentence
solve for x₁ and x₂6x₁+3x₂=606x₁-2x₂=80
does anybody know how to write 45/70 in simplest form????
How did the aboriginals people heal themselves before Europeans arrives?
what is the fraction ten twelfths in it's simplest form ?
Find the explicit formula that produces the given sequence. 3/2, 3/4, 3/8, 3/16,...
How do you find the length of a circle in geometry?
An ecosystem includes what?