Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 03 / Solutions / 01. Digit_Sum.cpp
blob: 7bedf7f5c71c660335e518cfbff530b1a6244f31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>

using namespace std;

int main()
{
	int n = 1, sum = 0;
	while (n != 0)
	{
		cin >> n;
		sum += n;
	}
	cout << sum << endl;
}