C-Programming
Monday, November 24, 2025
Print the factorial of given Number.
#include<stdio.h>
main()
{
int i,n;
unsigned long int fact=1;
printf("\n\nInput Number : ");
scanf("%d",&n);
for(i=1;i<=n;++i)
fact*=i;
printf("Factorial of %d is %ld ",n, fact);
}
Output
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment