Ask Question

For each of the following while loops, how many times will the loop execute its body? Remember that "zero," "infinity," and "unknown" are legal answers. a) int x = 1; while (x < 100) { System. out. print (x + " "); x + = 10; } b) int max = 10; while (max < 10) { System. out. println ("count down: " + max); max--; } c) int x = 250; while (x % 3! = 0) { System. out. println (x); } d) int x = 2; while (x < 200) { System. out. print (x + " "); x * = x; } e) String word = "a"; while (word. length () 0) { System. out. println (x / 10); x = x / 2; }

+5
Answers (1)
  1. 4 September, 17:55
    0
    a. 10 b. infinity c. infinity d. 3 e. 5 f. 7
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “For each of the following while loops, how many times will the loop execute its body? Remember that "zero," "infinity," and "unknown" are ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers