This C program reads a sequence of positive integers as input by the user and print their sum. The program keeps on taking the input from user until user enters number ( 0 ) and program calculates the sum of all input numbers. Finally this C program prints the sum of all the numbers on screen and terminates.

This program is an excellent demonstration of using do-while loop of C Programming.

Beginning C++23
Kickstart your coding journey with Beginning C++23 – the ultimate guide to mastering the latest in modern C++ programming!
View on Amazon

Output of the C Program is: