Exercise
While + Counter
Objetive
Create a java program to display the numbers 1 to 10 on the screen using "while".
Example Code
public class Main
{
public static void main(String[] args)
{
int n = 1;
while (n <= 10)
{
System.out.printf("%1$s ", n);
n++;
}
}
}