//3. Write a C program to calculate the factorial of a given number.
#include<stdio.h>
main()
{
int n,fact=1,i;
printf("enter a number");
scanf("%d",&n);
i=n;
while(n>0)
{
fact=fact*n;
n=n-1;
}
printf("the factorial of given number %d is =%d\n",i,fact);
}