Ask Question
21 February, 19:29

Write a do - while loop to get 20 numbers from the user and sum them together. output the sum after the loop. declare any variables you need.

+2
Answers (1)
  1. 21 February, 21:45
    0
    A do while loop in this situation is actually stupid. A for loop or while loop will suit this purpose better, since you do not need to make sure it executes at least once for the given condition. Do while loops are good for situations where the condition may not be true initially, and you'd like to guarantee execution at least once. E. g circular linked list node counter.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write a do - while loop to get 20 numbers from the user and sum them together. output the sum after the loop. declare any variables you ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers