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

Given f ( x ) = 3 x 2 − 3 and g ( x ) = x 2 3 x 2 , find f g ( 8 ) . Group of answer choices 4 1 2 2
Question 1/2 Tails7!
Question 1/2 Tails7!
Discuss the information found on a Time-Phased Force Deployment Data (TPFDD)
What is the common ratio of the sequence? 1,4,16,64
What is the relationship, according to Ellul, between the propagandist and his/her audience? Between propaganda and the materials of a culture (including histor
A farmer has three sons...they always quarrel... he gives them a bundle of sticks to break...all fail... the bundle is united...single stick is easily broken...
Which word is related to the feeling of kindness and empathy?a) Composureb) Complicationc) Compassiond) Confrontation
B plus the value of 6
What is the solution to this inequality?−16x<64A x<−4B x≥−4C x≤−4D x>−4