C program to find Factorial of any number

#include<stdio.h>
int main()
{
int num, fact=1, i=1;
printf("enter any number to find factorial \t");
scanf("%d",&num);
while(i<=num)
{
fact=fact*i;
i++;
}
printf("factorial = %d",fact);
return 0;
}

Comments

Popular posts from this blog

Computer Viruses

Handwritten Digits Recognition using Machine Learning