#include<stdio.h>
int main()
{
int i,n,fact=1;
printf("Enter any Positive integer number to find factorial\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
fact = fact * i;
}
printf("The factorial of given number is %d",fact);
return 0;
}
INPUT :
Enter any Positive integer number to find factorial
5
OUTPUT :
The factorial of given number is 120
Monday, December 17, 2018
WAP in C to find factorial of any given number
Topics
# C Programming
# Simple Programs
About HindiKisseKahaniyaan
Easy Programming All is a free blogger to the students who wants to learn programming in C, HTML, CSS, Bootstrap, Web Designing from home. The students can learn programming free of cost at their home. We provide best logics about any program. If you want to ask any logic of any program you can comment to us in comment box.
Simple Programs
Labels:
C Programming,
Simple Programs
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment