include<iostream.h>
#include<conio.h>
#include<iomanip.h>
int main()
{
clrscr();
int no;
long fact=1;
cout<<"enter no whose factorial is required"<<endl;
cin>>no;
for(int j=no; j>0;j--)
fact*=j;
cout<<"factorial is"<<setw(6)<<fact<<endl;
getch();
return 0;}
#include<conio.h>
#include<iomanip.h>
int main()
{
clrscr();
int no;
long fact=1;
cout<<"enter no whose factorial is required"<<endl;
cin>>no;
for(int j=no; j>0;j--)
fact*=j;
cout<<"factorial is"<<setw(6)<<fact<<endl;
getch();
return 0;}
0 comments:
Post a Comment