Sum of arguments

Write a program to sum the arguments of a function.

#include<stdio.h>
#include<stdarg.h>
int Calculate_sum(int,...);
int main()
{
	int sum;
	sum = Calculate_sum(2,10,20);
	printf("Sum = %d\n",sum);
	sum = Calculate_sum(3,10,20,30);
	printf("Sum = %d\n",sum);
	sum = Calculate_sum(4,10,20,30,40);
	printf("Sum = %d\n",sum);
	sum = Calculate_sum(5,10,20,30,40,50);
	printf("Sum = %d\n",sum);
	return 0;
}
int Calculate_sum(int n, ...)
{
	va_list v;
	int sum = 0,i,num;
	va_start(v,n);
	for(i = 0;i < n;i++)
	{
		num = va_arg(v,int);
		sum += num;
	}
	va_end(v);
	return sum;
}

Output

Sum = 30
Sum = 60
Sum = 100
Sum = 150