Assignment #112 and Odometer Loops

Code

                        /// Name: Graham Pollock
                        /// Period: 5
                        /// Program Name: OLoops
                        /// File Name: OLoops.java
                        /// Date Finished: 04/20/2016/

    import java.util.Scanner;
    
    public class OLoops
    {
    	public static void main( String[] args ) throws Exception
    	{
    		Scanner kb = new Scanner (System.in);
            
            System.out.print("What base would you like to count by? ");
            int n = kb.nextInt();
            
            for ( int thous=0; thous < n; thous++ )
    		    
    			    for ( int hund=0; hund < n; hund++ )
    			
    				    for ( int tens=0; tens < n; tens++ )
    				
    					    for ( int ones=0; ones < n; ones++ )
                  {
    						  System.out.print( " " + thous + "" + hund + "" + tens + "" + ones + "\r" );
    						  Thread.sleep(10);
    					    }
    		      System.out.println();
    	}
    }
    /// removing the open and closed braces did not prohibit it from working



    

Picture of the output

Assignment