Pages

Friday 18 March 2011

DESCRIPTION-:THIS PROGRAM FINDS THE FACTORIAL OF THE GIVEN NUMBER
PROGRAM-:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,n,fact=1;
cout<<"enter the no. whose factorial is to be find";
cin>>n;
for(i=1;i<=n;i++)
{
fact=fact*i;
}
cout<<"factorial of number is"<<fact;
getch();
}

0 comments:

Post a Comment

 
Copyright (c) 2010 Concepts Of C++. Design by WPThemes Expert

Blogger Templates and RegistryBooster.