using namespace std;
int number,factorial;
int main(){
cout<<"enter number for which you want factorial "<<endl;
cin>>number;
factorial=number;
while(factorial!=1){
factorial--;
number*=factorial;
}
cout<<"the factorial of the number = "<< number<<endl;
}
EmoticonEmoticon