Livejournal
Log in
Post
Friends
My journal
medvedskiy
do...while loop
medvedskiy
Jan 15, 2016 00:10
#include
using namespace std;
int main()
{
int userData;
int i = 0;
do
{
cin >> userData;
i = i + userData;
cout << i << endl;
}
while (userData != 0);
return 0;
}
do
,
cpp
,
c++
,
loop
,
programming
,
while
,
study
,
summ
Leave a comment
Up