View Code of Problem 112

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

Double click to view unformatted code.


Back to problem 112