//Program to find factorial of any no.
#include<stdio.h>
#include<conio.h>
main()
{
int i,fact,n;
printf("Enter the no:");
scanf("%d",&n);
fact=1;
for(i=1;i<=n;i++)
{
fact=fact*i;
}
printf("The factorial of %d no is :- %d",n,fact);
getch();
}
#include<stdio.h>
#include<conio.h>
main()
{
int i,fact,n;
printf("Enter the no:");
scanf("%d",&n);
fact=1;
for(i=1;i<=n;i++)
{
fact=fact*i;
}
printf("The factorial of %d no is :- %d",n,fact);
getch();
}
No comments:
Post a Comment