Assignemnt #40 Modulus Animation
Code
///Name: Morgan Kaplan
///Period: 5
///Project Name: ModulusAnimation
///File Name: ModulusAnimation.java
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(" 0o0o \r");
}
if ( i%11 == 0 )
{
System.out.print(" 0o0o0o0o \r");
}
if ( i%12 == 0 )
{
System.out.print(" 0o0o0o0o0o0 \r");
}
if ( i%13 == 0 )
{
System.out.print(" 0o0o0o0o0o0 \r");
}
if ( i%14 == 0 )
{
System.out.print(" 0o0o0o0o00o00o0o \r");
}
if ( i%15 == 0 )
{
System.out.print(" 0o0o0o00o0o0o0o0o0 \r");
}
if ( i%16 == 0 )
{
System.out.print(" 0o0o0o0o0o0o00o0o0o0o0o0 \r");
}
if ( i%17 == 0 )
{
System.out.print(" 0o0o0o00o0o0o0o0o0o0o00o00o \r");
}
if ( i%18 == 0 )
{
System.out.print(" 0o0o0o0o0o0oo00o0o0o0o0o0o0o0o0o0o0 \r");
}
Thread.sleep(200);
}
}
}
Picture of Output