View Code of Problem 112

#include<iostream>

using namespace std;

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

Double click to view unformatted code.


Back to problem 112