Computer Science, asked by mosam05, 1 year ago

java program to print first 20 natural number in reverse order​

Answers

Answered by rakeshchennupati143
6

Program:

import java.io.*;

public class Main{

     public static void main(String args[]){

           System.out.println("Java program to print first 20 natural numbers in reverse order : ");

           for(int i = 20 ; i > 0 ; i--){

                 System.out.println(i);

           }

     }

}

Output:

Java program to print first 20 natural numbers in reverse order :

20

19

18

17

16

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

----Hope This will help you  :)

Similar questions