#include<stdio.h>
#include<conio.h>
void main()
{
int num, fact, temp;
printf("Enter a number to calculete factorial");
scanf("%d",&num);
temp = num;
for(fact = 1; num>0 ; num--)
fact *= num;
printf("Factorial of Number %d = %d",temp,fact);
}
#include<conio.h>
void main()
{
int num, fact, temp;
printf("Enter a number to calculete factorial");
scanf("%d",&num);
temp = num;
for(fact = 1; num>0 ; num--)
fact *= num;
printf("Factorial of Number %d = %d",temp,fact);
}
0 comments: (+add yours?)
Post a Comment