Assignemnt #40 and Modulus Animation
Code
/// Name: David Shkolnikov
/// Period: 6
/// Program Name: Modulus Animation
/// File Name: ModulusAnimation.java
/// Date Finished: 10/16/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("Ddddddddd \r");
else if ( i%10 == 1 )
System.out.print("dDddddddd \r");
else if ( i%10 == 2 )
System.out.print("ddDdddddd \r");
else if ( i%10 == 3 )
System.out.print("dddDddddd \r");
else if ( i%10 == 4 )
System.out.print("ddddDdddd \r");
else if ( i%10 == 5 )
System.out.print("dddddDddd \r");
else if ( i%10 == 6 )
System.out.print("ddddddDdd \r");
else if ( i%10 == 7 )
System.out.print("dddddddDd \r");
else if ( i%10 == 8 )
System.out.print("ddddddddD \r");
Thread.sleep(200);
}
}
}
Picture of the output