#include <stdio.h>
int main()
{
int n,factorial;
factorial=1;
printf("Enter your number: ");
scanf("%d",&n);
while(n>0){
factorial=factorial*n;
--n;
}
printf("Your factorial number is : %d",factorial);
return 0;
}
int main()
{
int n,factorial;
factorial=1;
printf("Enter your number: ");
scanf("%d",&n);
while(n>0){
factorial=factorial*n;
--n;
}
printf("Your factorial number is : %d",factorial);
return 0;
}
No comments:
Post a Comment
Thank you for commenting. Please wait for response :)