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

1560ml means___ l and____ml
1. A football is kicked horizontally from a 20m high wall. How long is it before it lands? Take gravity to be 10 m/s*2 and ignore air resistance.2. If its horiz
How much does it cost to rent a business place for landscaping in Phoenix,Arizona?
what is the theme of the poem the toy?​
Solve the following simultaneous linear equations. 4x + 2y=10 x + 2y =7
Given f(x)=3x^(2)+4x+19, find f(-7)
Show that the set of all elements of the form (x²y, x³z, 2xy - z), where x, y, z ∈ ℝ, is a subspace of ℝ³.
The HCF and LCM of two numbers x and y are respectively 27 and 2079 if x is divided by 9 the quotient is 21 then find y
I need help for this homework please. Thank you !
What type of wave is used by the lighthouse to signal ships?