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 is the factor of (2ab)(-5ab)
pythagorean theorem If l = 12 cm and m = 35 cm, what is the length of n?
Show that 9x^2-17x-85=0 give you solutions to 3 correct significant figures There are two possible answers for x
Because the majority of the evening cable TV programs available dealt with violence and sex, the parents decided that the programs were for the children to watc
What was the Islamic Golden Age?
what is the negative of -1/3 and why??
John Sells Hamburgers For $3 Each and cheeseburgers for $3.50 each. One afternoon, he sells a total of 24 burgers for $79. How Many hamburgers did he sell?
Ratio equal to the ratio given 12:7
Scientists divide rocks into groups based on_________
three snack bars contain 1/5,0.22,and 19% of their calories from fat. which snack bar contains the least amount of calories from fat ?