Ask Question
3 November, 22:45

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.

+1
Answers (1)
  1. 4 November, 01:41
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers