CODING:
#include<stdio.h>
#include<conio.h>
void main()
{
int num,i,fac;clrscr();
printf("Enter any number ");
scanf("%d",&num);
fac=1;
for(i=1;i<=num;i++)
{
fac=fac*i;
}
printf("\nFactorial of %d is = %d",num,fac);
getch();
}
|
CODING |
|
OUTPUT |
For any query or suggestion please comment below...
No comments:
Post a Comment