//Write a Program to Print Factorial of a Number in C.
#include<stdio.h>
#include<conio.h>
void main()
{
int fact=1,n,i;
clrscr();
printf("Please Enter a
Value for Find the Factorial of a Number");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
fact=fact*i;
}
printf("The Factorial of
the Number %d is =%d",n,fact);
getch();
}
|
Write a Program to Print Factorial of a Number in C.
Friday, April 17, 2020
0
Tags
Share to other apps