View Code of Problem 112

#include<stdio.h>
int main()
{
	int i,n,a[100];
	while(scanf("%d",&n)!=EOF&&n!=0)
	{
		int s=0;
		for(i=0;i<n;i++)
		{
			scanf("%d",&a[i]);
			s+=a[i];
		}
		printf("%d\n",s);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 112