// Scott DeRuiter 10/14/2002 // OneToTen.java // Prints Numbers 1 to 10 with a for loop and a while loop public class OneToTen { public static void main ( String [] args ) { for ( int loop = 1; loop <= 10; loop++ ) { System.out.print( loop + " " ); System.out.println ( ); } System.out.println ( "" ); int loop = 1; while (loop <= 10) { System.out.print( loop + " " ); loop++; } } }