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

Finish each sentence using the vocabulary word provided 1.( Dilemma) having to decide 2.(roused) this morning,my parents.
how to calculate tfp​
What can cause a cyclical nature in a customer base? (Select all that apply.) a location that has an increasing population of “snow birds” a location at a shor
Can someone please help me to explain this slide have to present this slide and i dont know what to say about it and my topic is Should a University education b
y=|x−3|+|x+2|−|x−5|, if 3
Which of the following does the author do to strengthen his argument
sometimes a linear equation is not written in slope intercept form. how do you convert an equation such as y + 2= x into slope intercept form​
which old do you have to be to be a senator​
eeeek help, I don’t exactly know how to calculate the width of the missing shape!
PLS HELP ME WITH THIS QUESTIONNN