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

To safeguard your electronic documents from the prying eyes of others, you might wish to A. decode them. B. decipher them. C. password them.
Need help with all questions
Evaluate z + z + z for x = 2, y = -3, z = -4. 98points!! 12 -12 -9 -6
What is the volume of a 200. gram sample of gold if its density is known to be 20.5 g/cm3?
Which of the following takes place in the combustion chamber of a gas turbine engine? A. Gases are cooled to a desired temperature. B. Fuel oil is stored wi
17. What do we know about nutrient-drug interactions?
Which of these is NOT a central characteristic of Romantic writers? A. Valued nature and emotion. B. Felt the purpose of art was to be a mirror turned on societ
The midpoint of AB is (-2,-1). If A is the point (3,1) what are the coordinates of point B?
Simplify as much as possible. [2(x^-2)(x^4/5)(y^6) / x+y ]^-3
Read the excerpt from "The Fall of the House of Usher," by Edgar Allan Poe. Although, as boys, we had been even intimate associates, yet I really knew very litt