Assignemnt #40: Modulus Looping Animations
Code
/// Name: Sean Harrison
/// Period: 7
/// Program name: Creating Animations
/// File Name: ModulusAnimation.java
/// Date Finished: 10/13/2015
public class ModulusAnimation
{
public static void main( String[] args ) throws Exception
{
for ( int i=0; i<80; i++ )
{
if ( i%10 == 0 )
System.out.print(" <> Q <> W <> E <> R <> T <> Y\r " );
else if ( i%10 == 1 )
System.out.print(" Y <> Q <> W <> E <> R <> T <>\r " );
else if ( i%10 == 2 )
System.out.print(" <> Y <> Q <> W <> E <> R <> T\r " );
else if ( i%10 == 3 )
System.out.print(" T <> Y <> Q <> W <> E <> R <>\r " );
else if ( i%10 == 4 )
System.out.print(" <> T <> Y <> Q <> W <> E <> R\r " );
else if ( i%10 == 5 )
System.out.print( " R <> T <> Y <> Q <> W <> E <>\r " );
else if ( i%10 == 6 )
System.out.print( " <> R <> T <> Y <> Q <> W <> E\r " );
else if (i %10 == 7 )
System.out.print( " E <> R <> T <> Y <> Q <> W <>\r " );
else if ( i%10 == 8 )
System.out.print( " <> E <> R <> T<> Y <> Q <> W\r " );
else if ( i%10 == 9 )
System.out.print( " W <> E <> R <> T <> Y <> Q <>\r " );
else if ( i%10 == 10 )
System.out.print( " <> Q <> W <> E <> R <> T <> Y\r " );
Thread.sleep(200);
}
}
}
Picture of the output