Assignment # 40 and Modulus Animation

Code

    /// Name: Tommy Oyuntseren
    /// Period: 7
    /// Program Name: ModulusAnimation
    /// File Name: ModulusAnimation.java
    /// Date: 11/4/2015

public class ModulusAnimation
{
	public static void main( String[] args ) throws Exception
	{
		int repeats = 5;
		int steps_per_second = 10;

		for ( int i=0; i < repeats*13 ; i++ )
		{
			if ( i%13 == 0 )
				System.out.print("}>        0 \r");
			else if ( i%13 == 1 )
				System.out.print("}>        0 \r");
			else if ( i%13 == 2 )
				System.out.print("}->       0 \r");
			else if ( i%13 == 3 )
				System.out.print("}>->      0 \r");
			else if ( i%13 == 4 )
				System.out.print("} >->     0 \r");
			else if ( i%13 == 5 )
				System.out.print("}  >->    0 \r");
			else if ( i%13 == 6 )
				System.out.print("}   >->   0 \r");
			else if ( i%13 == 7 )
				System.out.print("}    >->  0 \r");
			else if ( i%13 == 8 )
				System.out.print("}     >-> 0 \r");
			else if ( i%13 == 9 )
				System.out.print("}      >->0 \r");
			else if ( i%13 == 10 || i%13 == 11 || i%13 == 12   )
				System.out.print("}       >-0 \r");

			Thread.sleep(1000/steps_per_second);
		}
		
	}
}


   
  

Picture of the output

Assignment 40