Program #112

Code

   
    /// Name: Afaf Nabeeha
    /// Period: 7
    /// Program Name: Odometer Loops
    /// File Name: Odometer.java
    /// Date Finished: 3/8/2016 public class Odometer

        import java.util.Scanner;
            
            public class Odometer
            {
            	public static void main( String[] args ) throws Exception
                {
                    Scanner keyboard = new Scanner(System.in);
                    int base = 0;
                    System.out.println( "what base? ( 2-10 ): " );
                    base = keyboard.nextInt();
                    
            for ( int thous=0; thous< base; thous++ )
            		
            for ( int hund=0; hund< base; hund++ )
            			
            for ( int tens=0; tens< base; tens++ )
            				
            for ( int ones=0; ones< base; ones++ )
            {
                System.out.print( " " + thous + "" + hund + "" + tens + "" + ones + "\r" );
            Thread.sleep(10);
            					}
            				
            			
            		
            
            		System.out.println();
            	}
            }

             
    

Picture of the output

Assignment 112