Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <unistd.h>
- void clear_screen(void)
- {
- printf("\e[2J\e[H");
- fflush(stdout);
- }
- void wait_message(const char *str)
- {
- while (1) {
- printf("%s", str);
- for (int i = 0; i < 5; i++) {
- putchar('.');
- fflush(stdout);
- sleep(1);
- }
- clear_screen();
- }
- }
- int main(void)
- {
- wait_message("so bored");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement