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

A growing number of LPNs are beginning to work in ___ A) Day surgery centers B)Extended care facilities C)Nursing homes D)All of the above
The author of the editorial "Rethinking Ground Zero" believes that: a. The public should have a say in changes to the Freedom Tower. b. The public should stay o
in about 50 words, write a paragraph about tirunesh.​
how many calories does an hour of weightlifting burn
Which type of information should never be given out on social media?
a total eclipse of the sun can only occur during which phase of the moon?
An airplane has 12 out of the 180 seats dedicated to first class. What percent of the seats are dedicated to first class ?​
What data will you need to determine whether a chemical reaction occurred?
which of the following is not an adverb A. quickly B. rapidly C. big D. intadvertently E. fast
Which graph represents a function with direct variation?