Home
Posts RSS
Comments RSS
Edit
Programs
Search & Find out
Saturday, November 21, 2009
Factorial of 'n' number
,
Author:
Raviteja
|
Filed Under:
c
|
#include "stdio.h"
#include"conio.h"
void main()
{
clrscr();
int n,i,f=1;
printf(" Enter a number ");
scanf("%d",&n);
for(i=n;n>0;n--)
{
f=f*i;
}
printf("\n\n The factorial of the number %d is %d",n,f);
getch();
}
Download the executable (.exe) file for this program..
download
0 comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
StoresnOffers.com
Find the best Local Offers, Stores from Stores, Restaurants, Malls and Supermarkets near you. Follow us to get Latest Deals & Offers
http://www.storesnoffers.com
Like Facebook Page
Popular Posts
Basic of C Program
Basics of C Format : #include "stdio.h" \* Header files*/ #include ...
character to it's ASCII value
#include "stdio.h" #include "conio.h" void main() { char n; clrscr(); printf("Enter a character to ge...
PALINDROME
#include "iostream.h" #include "conio.h" class demo { private: int n,N,q,r,R; public: v...
OPERATOR
#include "iostream.h" #include "conio.h" int g=1000; class f { public: void c(); private: int ...
Adding two numbers using single level inheritance
#include "iostream.h" #include "conio.h" class one { private: int c; protected: int a,b;...
bresenham line drawing Program
#include "stdio.h" #include "conio.h" #include "graphics.h" #include "math.h" void brs (int x1,...
SUM OF EVEN NUMBERS
Write a program to accept a number 'n' from the user and print the sum of all even numbers from 2 to number 'n'. #includ...
FORDWARD & BACKWARD DIFFERENCE TABLE
#include "stdio.h" #include "conio.h" #include "math.h" void main() { int o,i,n,m,q,j,p,k[100],z; f...
IF ELSE
Knowning the working of IF ELSE statements #include "stdio.h" #include "conio.h" void main() { char a; clrscr(...
ASCII value to a character
#include "stdio.h" #include "conio.h" void main() { int n; clrscr(); printf("Enter a ASCII value to ...
Labels
c
(57)
c#
(1)
c++
(20)
Blog Archive
Blog Archive
November (1)
December (52)
November (22)
About Me
Raviteja
View my complete profile
My Blog List
Term of Use
0 comments:
Post a Comment