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

Which of these molecules is an important source of ENERGY for most organisms? Question 2 options: glycogen table salt NaCl hydrochloric acid glucose
Which statement about the slopes of the functions is true?
P(x)=x^4−3x^2+kx−2 where k is an unknown integer P(x) divided by (x−2) has a remainder of 10. What is the value of k?
what is photosynthesis​
Name three of the six subjects that were planned for the first U.S. presidential debate between incumbent Republican President Donald Trump and Democratic Presi
Which character would be considered heroic in ancient Greek myths? a character who fights innocent people out of anger and hatred a character who fights enemies
HELP ME PLEASE!!! (1)Enter the symbol of the element which would have 36 electrons and -1 charge. (2)Enter the symbol of the element which would have 0 electron
Can someone please help me
PLEASE ASPA HELP PLEASE ASAP ASAP
What is the Judge's strongest or most powerful idea? Use one of the Key Vocabulary words in your response.