C Program to print factorial of numbers from 1 to 15
#include
#include
void main()
{
float i,f=1;
clrscr();
for(i=1;i<=15;i++)
{
f=f*i;
printf("\nFactorial of %0.0f :%0.0f",i,f);
}
getch();
}
*************OUTPUT************
Factorial of 1 :1
Factorial of 2 :2
Factorial of 3 :6
Factorial of 4 :24
Factorial of 5 :120
Factorial of 6 :720
Factorial of 7 :5040
Factorial of 8 :40320
Factorial of 9 :362880
Factorial of 10 :3628800
Factorial of 11 :39916800
Factorial of 12 :479001600
Factorial of 13 :6227020800
Factorial of 14 :87178289152
Factorial of 15 :1307674279936
Shopping In MUMBAI
Are you searching for Discounts, offers, sale in Mumbai ? You are in the right place. MUMBAI, a shopping haven, has no dearth of great discounts and sales. This blog features the best MUMBAI shopping offers, sale, discounts and deals and bargains CURRENTLY GOING on in Mumbai plus a few free things thrown in on top.
Don't wait for it because once they are gone, they are gone. Hurry!..By clicking the "Like" button you will receive a daily update of discounts, sale, offers going on in Mumbai. LIKE IT.... SHARE IT...njoY.
Wednesday, December 31, 2008
C Program to print factorial of numbers from 1 to 15
Posted by ars at 11:53 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment