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

in how many ways can a student arrange 6 textbooks on a locker shelf that can hold 4 books at a time? 30 120 240 360
Fats are a healthy part of a diet. true false
Help me plzz I'll do the same
An equation is shown below: 5(2x - 8) + 15 = -15 Write the steps you will use to solve the equation and explain each step.
Which of his own pieces of writing does poe use to explain his philosophy of composition?
which sentence uses the passive voice for the main verb? if we use our cell phones during class, the teacher confiscates them. when they can, students slide dow
The iron-containing protein found in red blood cells isO A) hemoglobin.O B) white blood cells,O C) platelets.O D) plasma.
Which of his own pieces of writing does poe use to explain his philosophy of composition?
Compounds are neutral substances. true false
All numbers divisible by both 24 and 14 are also divisible by which of the following?