Assignment #40 Modulus Animation
Code
///Name: Ian Grant
///Period:5
///Project Name: Modulus Animation
///File Name:ModulusAnimation.java
///10/26/15
public class ModulusAnimation
{
public static void main( String[] args ) throws Exception
{
//int repeats = 5;
//int steps_per_second = 10;
for ( int i=0; i< 80; i++ )
{
if ( i%12 == 0 )
System.out.print("* ** *** \r");
else if(i%12==1)
System.out.print(" * ** *** \r");
else if(i%12==2)
System.out.print(" * ** *** \r");
else if(i%12==3)
System.out.print(" * ** *** \r");
else if(i%12==4)
System.out.print(" * ** *** \r");
else if(i%12==5)
System.out.print(" * ** *** \r");
else if(i%12==6)
System.out.print(" * ** *** \r");
else if(i%12==7)
System.out.print(" * ** *** \r");
else if(i%12==8)
System.out.print(" * ** *** \r");
else if(i%12==9)
System.out.print(" * ** *** \r");
else if(i%12==10)
System.out.print(" * ** *** \r");
else if(i%12==11)
System.out.print("* ** *** \r");
Thread.sleep(200);
}
}
}
Output