Ask Question
30 June, 16:26

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.

+4
Answers (1)
  1. 30 June, 16:33
    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 & 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