#include <iostream>
using namespace std;
void print(int n){
if(n==0)
return; //base function
print(n-1); //call
cout<<n<<endl; //work
}
int main() {
int n; // another variable declared
cin>>n;
cout<<" enter n : "<<n;
cout<<endl;
print(n);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: