Last active
March 10, 2019 12:25
-
-
Save ezhov-da/771f7e594478d1bc33febad45f6d868c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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