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

graph the equation y= -3x+4
Scientists discover a new, efficient way to extract oil. Which statement describes one way this discovery will most likely affect society? Global warming will d
can someone help me?? Strategies for finding a 30 % increase....
HELP FAS, worth 20 points
A direct democracy is a government in which all the citizens vote for or against every law do you think direct democracy would work in the untied states
jillian is trying to find out where the fifth grade class would like to their graduation. She randomly selected 50 students A) Yes but she should also survey th
35 plus what gives you 52.50
In words define prejudice and discrimination
The circumference of a circle is 15 ft. find its area writing 3.14 for pi
When Mosa and her team zoom in on Rose’s eggs, what do they notice is different than the reproduction of the algae?