COMPUTER PROGRAMMING
Pages
Home
Showing posts with label
Factorial Of A Number
.
Show all posts
Showing posts with label
Factorial Of A Number
.
Show all posts
Tuesday, 25 December 2012
FACTORIAL OF A NUMBER
/* Factorial Of A Number */
#include<stdio.h>
void main()
{
int n,f=1,i=1;
printf("Enter the number:\n");
scanf("%d",&n);
while(i<=n)
{
f=f*i;
i++;
}
printf("Factorial of the number is %d",f);
}
Read more »
Older Posts
Home
Subscribe to:
Posts (Atom)