#include<stdio.h>
#include<conio.h>
void main()
{
int n,f;
f=1;
printf("Enter the number:\n");
scanf("%d",&n);
while(n>0)
{
printf("%d",n);
f=f*n;
n--;
}
printf("The factorial of the integer is:%d",f);
getch();
}
#include<conio.h>
void main()
{
int n,f;
f=1;
printf("Enter the number:\n");
scanf("%d",&n);
while(n>0)
{
printf("%d",n);
f=f*n;
n--;
}
printf("The factorial of the integer is:%d",f);
getch();
}
No comments:
Post a Comment