CoolCoding.org
Showing posts with label
c language
.
Show all posts
Showing posts with label
c language
.
Show all posts
Thursday, 27 August 2015
Factorial program in C
Factorial program in C
Click Here for step by step Video Tutorial
Facebook Page
Code-
#include <stdio.h>
void main()
{
int i,n,fact=1;
printf("Enter a natural number to calculate it's factorial\n");
scanf("%d",&n);
for (i= 1;i<=n;i++)
fact=fact*i;
printf("Factorial of %d=%d\n",n,fact);
}
Older Posts
Home
Subscribe to:
Posts (Atom)