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

Karen was able to live in a coma for several years even when taken off the respirator. this is because parts of the body not under conscious control continue to
Colors on a physical map might never used to show an areas , or height above sea level
Consider the following division of polynomials. x4+x3+7x2-6x+8/x2+2x+8 A) Use long division to determine the quotient of the polynomials. Show all of your work
let f(x)=x-2 and g(x)=x2-7x-9 find f(g(-1))
How do you solve 58ad/b ?
The minimum amount of energy that reactants must have to start a chemical reaction is called
The American Federation of Labor excluded _______ workers in order to attract only highly paid and high-demand workers.
Under what circumstances does distance traveled equal magnitude of displacement? what is the only case in which magnitude of displacement and displacement are e
Does anyone know the answer to this question???? Been struggling for a while
When he was very young, william took an intelligence test as part of a research study. decades later, william is asked if he would be willing to take another in