#include<stdio.h>
main()
{
double n,ans=1;
clrscr();
printf(" Enter a number\n to find
factorial of it : ");
scanf("%lf",&n);
while (n>1.)
{
ans*=n;
--n;
}
printf(" answer =
%.2lf",ans);
getch();
}
No comments:
Post a Comment