#include <iostream>
using namespace std;

void print( int n){
    if(n==0) return; 
    print(n-1);      //calling the next function  first before printing the next line
    cout<<n<<endl;    // printing
   
}
int main() {
    int n;
    cin>>n;
    print(n);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: