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 areas where physical geography made farming more difficult for British colonists, what else do you think th ey might have done for a living
10. Estimate: 46.8 - 32.97
2. A new fertilizer is being tested to determine if it will help plants grow. Each day the researcher gives fertilizer to half the plants and measures the heigh
two negative numbers that equal into 5 negative
Lee y escoge la opción con la forma correcta del verbo para completar la frase. Read and choose the option with the correct form of the verb to complete the sen
Assume that the population proportion is .55. Compute the standard error of the proportion, ( ), for sample sizes of 100, 200, 500, and 1000 (to 4 decimals)
2.41 What is an ionic compound? How is electrical neutrality maintained in an ionic compound?
What do biologists ask question about and study using the scientific process
A belief judgement or way of thinking about something is called?
Determine the point estimate of the population mean and margin of error for the confidence interval. Lower bound is 16​, upper bound is 28 in statcrunch