#include<conio.h>
#include<iostream.h>
void main()
{
clrscr();
int N,fact;
cout<<"Enter a Number ' N' ";
cin>>N;
fact=N;
for(int i=1;i<5;i++)
{
fact=fact*(N-i) ;
}
cout<<"The Factorial of "<<N<<"is : " <<fact;
getch();
}
#include<iostream.h>
void main()
{
clrscr();
int N,fact;
cout<<"Enter a Number ' N' ";
cin>>N;
fact=N;
for(int i=1;i<5;i++)
{
fact=fact*(N-i) ;
}
cout<<"The Factorial of "<<N<<"is : " <<fact;
getch();
}
No comments:
Post a Comment