Write a program to calculate factorial of a given number.
#include<stdio.h>
#include<conio.h>
void main()
{
int i,b=1,n;
printf("enter the number:");
scanf("%d",&n);
for(i=1;i<=n;i++)
b=b*i;
printf("factorial number is:%d",b);
getch();
}
#include<conio.h>
void main()
{
int i,b=1,n;
printf("enter the number:");
scanf("%d",&n);
for(i=1;i<=n;i++)
b=b*i;
printf("factorial number is:%d",b);
getch();
}