Programming Assignment #35
Code
/// Name: Dylan Sleeper
/// Period: 6
/// Program Name: Else and If
/// File Name: Weekday.java
/// Date Finished: 10/22/2015
public class ModulusAnimation
{
public static void main( String[] args ) throws Exception
{
for(int u = 0; u < 10; u++){
for ( int i=0; i<100; i++ )
{
if ( i%10 == 0 ){
System.out.print(" ......... \r");
}
if ( i%20 == 0 ){
System.out.print(" :........ \r");
}
if ( i%30 == 0 ){
System.out.print(" .:....... \r");
}
if ( i%40 == 0 ){
System.out.print(" ..:...... \r");
}
if ( i%50 == 0 ){
System.out.print(" ...:..... \r");
}
if ( i%60 == 0 ){
System.out.print(" ....:.... \r");
}
if ( i%70 == 0 ){
System.out.print(" .....:... \r");
}
if ( i%80 == 0 ){
System.out.print(" ......:.. \r");
}
if ( i%90 == 0 ){
System.out.print(" .......:. \r");
}
if ( i%100 == 0 ){
System.out.print(" ........: \r");
}
Thread.sleep(20);
}
}
}
}
Outputs