C - A2P2 -Find the Factorial of given number
in
c
,
C++
,
factorial
,
SPNM
- on
10:25 AM
-
No comments
/* Write a Programe to find the factorial of given number */
#include<stdio.h>
#include<conio.h>
void main()
{
int fact=1,a,no;
clrscr();
printf("Enter Number ->");
scanf("%d",&no);
a=no-1;
fact=no;
while(a>0)
{
fact=fact*a;
a--;
}
printf("\n\nFactorial - > %d",fact);
getch();
}
Post a Comment