Print all the numbers from 5 to 1 using for loop

Suman Barik
0

// Online Java Compiler

// Use this editor to write, compile and run your Java code online


public class HelloWorld {

    public static void main(String[] args) {

        for(int i=5; i!=0; i--){

            System.out.println(i);

        }

    }

} 

Post a Comment

0Comments
Post a Comment (0)