View Code of Problem 112

#include<stdio.h>
#include<stdlib.h>

int main(){
	int order=0;
	while((scanf("%d",&order)!=EOF && order!=0)){

		long long int sum=0,temp;
		while(order--){
			scanf("%lld",&temp);
			sum = sum + temp;
		}
		printf("%lld\n",sum);

	}

	return 0;
}

Double click to view unformatted code.


Back to problem 112