akatamashhii akatamashhii
  • 11-01-2022
  • Computers and Technology
contestada

7. Rewrite this "for" loop into a while loop:
for (int i = 0; i < 6; i = (i + 2)/2) {
System.out.print(i + " ");
}
+

Respuesta :

s1780432 s1780432
  • 20-01-2022

Answer:

int i = 0;

while (i<6) {

   System.out.print(i + " ");

   i = (i+2)/2;

}

Explanation:

Answer Link

Otras preguntas

Use the substitution method to solve the system of equation.choose the correct ordered pair. 2 x+3y=29 x=4
A patient is administered 20 mg of iodine-131. How much of this isotope will remain in the body after 40 days if the half-life for iodine-131 is 8 days?
Which line in this excerpt from war of worlds by H.G. well suggest a future in which humans will inhabit distant planets
No two performances of The Unanswered Question are the same because A. Charles Ives never wrote it down. B. it's improvised. C. orchestras are diffe
An object is thrown upward from the top of a 144​-foot building with an initial velocity of 128 feet per second. The height h of the object after t seconds is
455+ 475+4747+484 568
a(3x-8)=b-18x What’s the value of a? What’s the value of b?
Indicate whether the number is divisible by 2, by 3, or by 5.(Note: Some numbers may be divisible by more than one of these numbers.) a. 450 b. 31 c. 18,652 d.
An increase in the calcium ion level in the sarcoplasm starts the sliding of the thin filaments. when the level of calcium ions declines, sliding stops. a. True
How many people with schizophrenia suffer from delusions? Question 2 options: 1 in 3 4 out of 5 1 out of 100 50%