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 phone company uses the equation y=0.15x+10 to find y the monthly charge for a customer sending x text messages. How many text messages are sent if the monthly
Find the surface area of a rectangular prism with a length of 6.9mm, a width of 8.2mm, and a height of 14mm.
Hello. For my french class I have to write a letter to my french friend. In this letter I have to talk about spending my holiday at his house. (for example: wha
|-6|+|3| I really don't get it do I simply find the sum our is it something different plz explain
How does latitude affect climate
What caused Portugal to finallywithdraw from its African colonies?
I have been stuck with this one, and i would like to how to solve this. In each case, determine whether line AB is parallel or perpendicular to CD. (a) A(0, 0),
What is a fraction name for 4
What is an "alloy" in the chapter of metals in chemistry??
what is the percent notation for 6.4%