Write a c program to find out factorial of a number

Find out factorial of a number

#include<stdio.h>
#include<conio.h>
main()
{
int i,fact=1,n;
printf("please enter the value");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
fact=fact*i;
}
printf("value of fact %d is %d",n,fact);
getch();
}

Post a Comment

0 Comments