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

how differences between romeo and juliet returned to threaten their future together
what percent of 84 is 21
a number that multiply by -15 can give me adding +2
Use logarithmic differentiation to find dy/dx: y=((x^3)(2x+3)^1/2) / (x-2)^2
The U.S. Census is most likely to result in changes in policy and representation in Congress gerrymandering and shift in socioeconomics of districts removal of
John is 6 years older than Kathy. Together their ages equal four times Kathys age. How old is each?
what's a good thesis statement for a research paper about cancer?
Why is individuality important
how do you know the force for an acceleration of zero?
As part of a class project, mesut collected $126 in donations for a local hospice. That amount was 7% of the total amount collected by the class. How much money