#include<iostream>
using namespace std;
int factorial(int x){
if(x==0){ // Base-case ( VERY IMPORTANT)
return(1);
}
else{
return(x*(factorial(x-1))) ;
}
}
int main(){
int no = 5;
cout << factorial(no) ; // 120
}