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 scn = new Scanner(System.in);
        
        int a = scn.nextInt();
        int i = 1;
        
        for (i=1;i<=a; i++) {
            if (a>=0) {
                if (a%i ==0)
            System.out.println("Enter a positive number to find the positive consective number till the input value. Number " + i + " is not a positive number");
            }
            else if (a%i ==0) {
            System.out.println("Entered value is a positive number. Please find the results below");
            }
            
             i++;
            
            System.out.println(i);*/
            
        
                /*Scanner scn = new Scanner(System.in);
            
                long n = scn.nextLong();
                int i = 1;
                
                while(i<=n)
                { System.out.println(i);
                 i = i+1;
                System.out.println(i + " " + i + 1 + " " + i +1);
                i = i+2;
                System.out.println(i + i+1 + " " + i+1 + " " + i+1);
                i = i+2;
                System.out.println(i + i+1 + " " + i+1);
                i = i+2;
                System.out.println(i+1);
                i = i-10;
                }*/
            
                    
                /*Scanner scn = new Scanner(System.in);

        int N = scn.nextInt();
        int i = 1;
        int a = N--;

            while(i<=N){
                
                if (N>=1 && N<=10000000);
                System.out.print(a + " ");
                a--;
                }*/
            
            
             Scanner scn = new Scanner(System.in);

        int N = scn.nextInt();
        int i = 1;

            while(N>=i){
                System.out.print(N + " ");
                N--;
            }

            
    }
}

Embed on website

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