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 two courses could the United States take Which choice does Madison want Congress to take
What is the equivalent of pi over 3 radians in degrees?
Experts/ace/geniuses helppp asapp
Would gallium, atomic #31, likely form a action or an anion?
What is ironic about gulliver using his glasses as a shield in a military operation in Jonathan Swift’s gullivers travels
In 1358, french peasants staged an angry protest known as ________ that took the lives of hundreds of noblemen before it was suppressed by the french king.
The difference of sample means of two populations is 108.7, and the standard deviation of the difference in sample means is 32. Which statement is true if we ar
Identify the oxidized substance, the reduced substance, the oxidizing agent, and the reducing agent in the redox reaction. mg(s)+cl2(g)⟶mg2+(aq)+2cl−(aq)
during world war 2, the United States opposed which Axis dictatorships
Summarize the narrative Churchill present