Assignemnt #3 Comments And Slashes
Code
///Name: JJ Deng
///Period: 6
///Program Name: Modulus Animation
///File Name: MA.java
///Date Finished: 10/29/15
public class MA
{
public static void main( String[] args ) throws Exception
{
int repeats = 5;
int steps_per_second = 10;
for ( int i=0; i< repeats*11 ; i++ )
{
if ( i%12 == 0 )
System.out.print(".JJ Is Cool..\r");
else if ( i%12 == 1 )
System.out.print("..JJ Is Cool.\r");
else if ( i%12 == 2 )
System.out.print("...JJ Is Cool\r");
else if ( i%12 == 3 )
System.out.print("..JJ Is Cool.\r");
else if ( i%12 == 4 )
System.out.print(".JJ Is Cool..\r");
else if ( i%12 == 5 )
System.out.print("JJ Is Cool...\r");
else if ( i%12 == 6 )
System.out.print(".JJ Is Cool..\r");
else if ( i%12 == 7 )
System.out.print("..JJ Is Cool.\r");
else if ( i%12 == 8 )
System.out.print("...JJ Is Cool\r");
else if ( i%12 == 9 )
System.out.print("..JJ Is Cool.\r");
else if ( i%12 == 10 )
System.out.print(".JJ Is Cool..r");
Thread.sleep(3000/steps_per_second);
}
}
]
Picture of the output