Assignemnt #108 Odometer Loop

Code

    /// Name: JJ Deng
    /// Period: 6
    /// Program Name: Odometer Loops
    /// File Name: OdometerLoops.java
    /// Date Finished: 4/27/2016

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


    

Picture of the output

Assignment 112