View Code of Problem 112

#include<bits/stdc++.h>
using namespace std;
long long a[51];
int main() {
	int t,a;
	while(cin>>t&&t!=0)
	{
		int sum=0;
		while(t--)
		{
			cin>>a;
			sum+=a;
		}
		cout<<sum<<endl;
	}
}

Double click to view unformatted code.


Back to problem 112