Rahul's Programming Heaven
C,C++,Java,C#,.Net, Win32,Visual C++, Windows Programming & How To's. Get All The Solutions.
Blog Archive
Blog Archive
February (1)
March (1)
April (1)
September (2)
August (1)
May (3)
December (1)
September (1)
August (19)
May (7)
November (2)
August (1)
Sunday, August 29, 2010
Find factorial of a number
/*
Find factorial of a number
*/
#include
#include
void main()
{
int number=0,fact=1;
printf("Enter Number.");
scanf("%d",&number);
while(number>0)
{
fact *=number--;
}
printf("Factorial is %d",fact);
return;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment