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

Which are the roots of the quadratic function f(q) = q2 – 125? Check all that apply.
1. Describe a system that would be dangerous if resistance were not a part of the circuit
George bought 7.5 cases of pancake mix for his diner. A case contains 12 1.3-pound boxes. How many pounds of pancake mix did George buy?
Nikolas had an idea that he could use the compressed carbon dioxide in a fire extinguisher to propel him on his skateboard. Nikolas, the fire extinguisher, and
to add the word "confidential" to the background of a page , users would need to___. 1)use the page color option 2)insert a water mark 3)layer the text behind
The median weight of the players is _____. 154 158 163 167 169
Write an argumentative paragraph supporting evolution.
Write 14, divided by, 35, end fraction in simplest form.
The cell bodies of the ________ neurons are always located within the cns.
When a company had total control over the supply of a product or service it was known as a: Suffrage Monopoly Allotment Descrimination