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

All animals are a. land-dwelling multicellular heterotrophs. b. capable of walking on legs. c. multicellular, heterotrophic and lack cell walls. d. unicellu
1/X + 1/X+3 in simplest form
the earliest of the Greek agricultural orders was
Stupas were best described as what
Which is the correct substitute for the underlined words? el duque ama a la duquesa. a. est b. sta c. est s d. esta
A rock bounces down a mountain. When will its kinetic energy be greatest?
Which of the following describes a primary cause of the Neolithic Revolution? A. The rise of the first monarchies B. The rise of monotheistic religionsc. the ex
Who is the king hemu?
Point B is AC between A and C. If AB is doubled and BC is also doubled, predict the effect on AC.
Which shows all the names that apply to the figure? A. parallelogram and rectangle B. parallelogram, rhombus, and rectangle C. parallelogram, rectangle, an