/*A program to find the factorial of a given number*/
#include<stdio.h>
int main()
{
int i,a,fact;
fact=1;
printf("Enter the number");
scanf("%d",&a);
for(i=1;i<=a;i++)
{
fact=fact*i;
}
{printf("
%d!=%d",a,fact);
}
return 0;
}
OUTPUT:
#include <stdio.h> #include <math.h> int main () { int i , j , num , temp , sum = 0 ; printf ( "Enter number\n...
Sir, I was really confuse on finding factorial of a number. I tried several times but I couldn't do. But after watching this post you made me clear. This program is simple and very clear. You are the hero sir. Please keep posting more programs daily. I love you sir😍😍
ReplyDelete.
.
.
.
.
.
.
.
.
Kaisa laga mera mazak😂😂
Hey Dilip B.K. thanks for your feedback on it.
Delete