Skip to content

Instantly share code, notes, and snippets.

@ezhov-da
Last active March 10, 2019 12:25
Show Gist options
  • Save ezhov-da/771f7e594478d1bc33febad45f6d868c to your computer and use it in GitHub Desktop.
Save ezhov-da/771f7e594478d1bc33febad45f6d868c to your computer and use it in GitHub Desktop.
import java.util.concurrent.TimeUnit;
public class TestConsole {
public static void main(String[] args) {
int start = 100;
int delimMode;
if (start <= 21) {
delimMode = 1;
} else {
delimMode = start / 20;
}
for (int i = 0; i < start; i++) {
String print;
if (i + 1 == start) {
print = "#\n";
} else {
print = "#";
}
if (i % delimMode == 0) {
System.out.print(print);
}
try {
TimeUnit.MILLISECONDS.sleep(3);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment