Print all the numbers from 1 to 10 using do while 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) {

        int i=1;  

        do{  

        System.out.println(i);  

        i++;  

        }while(i<=10); 

    }

}

Post a Comment

0Comments
Post a Comment (0)