#include<stdio.h>
#include<conio.h>
int mul(int );//function prototype
int main()
{
int a,sum=0, num;
printf("Enter last number: ");
scanf("%d", &num);
printf("sum is %d", mul(num));// function call which can pass the value to function definition
getch();
}
int mul(int x)// function definition
{
int sum=0, a;
for(a=1;a<=x;a++)
{
sum=sum+a;
}
return sum;
}