#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,a;
cout<<"Enter any number:";
cin>>a;
i=a-1;
while(i>0)
{
a=a*i;
i--;
}
cout<<a;
getch();
}
#include<conio.h>
void main()
{
clrscr();
int i,a;
cout<<"Enter any number:";
cin>>a;
i=a-1;
while(i>0)
{
a=a*i;
i--;
}
cout<<a;
getch();
}
No comments:
Post a Comment