package IncludeHelp; public class Print_1_To_10_UsingWhile { public static void main(String args[]) { //loop counter initialisation int i=1; //print statement System.out.println("Output is : "); //loop to print 1 to 10. while(i<=10) { System.out.println(i); i++; } } }
Output
Output is : 1 2 3 4 5 6 7 8 9 10
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Program to print the number from 1 to 10 using while loop in java
Output