/* C Program To Find Factorial Of Given Number */
For any query regarding c/c++ feel free to contact me on khimanichirag@gmail.com or comment below. I try my best to solve it.
For any query regarding c/c++ feel free to contact me on khimanichirag@gmail.com or comment below. I try my best to solve it.
#include <stdio.h>
#include <conio.h>
void main()
{
int number,i,fact=1;
clrscr();
printf("\nEnter a number");
scanf("%d",&number);
for(i=1;i<=number;i++)
{
fact=fact*i;
}
printf("Factorial of given number is: %d",fact);
getch();
}
No comments:
Post a Comment