#include
#include
void main()
{
int f=1, n, i;
clrscr();
printf(“\n\n enter a number: “);
scanf(“%d”,&n);
for(i=n;i>1;i--) //or use for(i=1; i<=n; i++)
{
f=f*i;
}
printf(“\n\n\a\tThe Factorial is :%d”,f);
getch();
}
o/p→
enter a number :
Everyone Is Equal In Front Of Tecinology
Hello Friends,
I am writing the programs for you.
Start noting from bottom to top.
Visit
0 comments:
Post a Comment
If you have any proble fee free to ask it here