View Code of Problem 112

#include <iostream>
using namespace std;
int main(){
	int n;
	while(cin>>n&&n!=0){
		int sum=0;
		for(int i=0;i<n;i++){
			int t;
			cin>>t;
			sum+=t;
		}
		cout<<sum<<endl;
	}
} 

Double click to view unformatted code.


Back to problem 112