Assignment #40 Modulus Animation
Code
/// Name: Lacey Reese
/// Period: 5
/// Program Name: ModulusAnimation
/// File Name: ModulusAnimation.java
/// Date Finished 10/29/2015
public class ModulusAnimation
{
public static void main( String[] args ) throws Exception
{
for ( int i=0; i<80; i++ )
{
if ( i%16 == 0 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 1 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 2 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 3 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 4 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 5 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 6 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 7 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 8 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 9 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 10 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 11 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 12 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 13 )
System.out.print(" *_*_*_*_ \r");
else if ( i%16 == 14 )
System.out.print(" *_*_*_*_* \r");
else if ( i%16 == 15 )
System.out.print(" *_*_*_*_* \r");
Thread.sleep(200);
}
}
}
Picture of the output
// This was really frustrating