import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
            //System.out.println("Hello world!");
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                dac(n);
            }
        public static void dac(int n){

        if (n == 0 ) {return;}
        System.out.print(" " +n);
            dac(n-1);            
        }
    
}

Embed on website

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