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

what is the portion of a market controlled by a particular company or product? Choose the answer. a) market share b) market goal c) sales funnel d) market budge
What to do in 49 days after death?
What is the moral of the Epic of Gilgamesh What lesson did Gilgamesh learn?
What is the moral of the Epic of Gilgamesh What lesson did Gilgamesh learn?
6. Suppose that we are designing a completely randomized block design with 120 subjects, where the subjects are divided into two blocks of equal size. In this e
Why can't 1 be the base of an exponential equation?
Which sentences use apostrophes correctly? a) Captain America's shield was made from vibranium. b) Thanos wanted to use the six Infinity Stones' power to restor
A newspaper conducts a poll online to determine what proportion of voters approve of the proposed tax increase. In order to participate, people need to log onto
restaurant bill for 4 people is $120. The group leaves a tip of $18. What percent tip is that?
physical geography, also known as