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

3. En las siguientes oraciones encierra las palabras que contengan hiato e indique el hiato que tienen 1 Miguel viajó a un país europeo a estudiar una maestrí
Similarities between organized Sector and Unorganised sector​
Which expression represents the perimeter of triangle YXZ?
Please help me for chorus i beg of u
F(x)= 2 + x^2 what is f (-5)
Wayne and May, who are both in their early 40s, have been happily married for nearly 20 years. While they have been saving some money for their eventual retirem
what’s the value of x ?
Find the volume V of the solid obtained by rotating the region bounded by the given curves about the specified line. y = ln 5x, y = 4, y = 6, x = 0; about the
Election of 1860 the Candidates of each party had a president what was their stance on slavery
a new school has a teacher to student ratio is 2:15. the school has 42 teachers. how many students are there in the school?