View Code of Problem 112

#include<stdio.h>
void main ()
{
    int n,b,num;
    while(scanf("%d",&n)&&n!=0)
	{
	num=0;
	while(n--)
	{
		scanf("%d",&b);
		num+=b;
	}
	printf("%d\n",num);
}
}

Double click to view unformatted code.


Back to problem 112