Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- char cat[3][11] = {
- {"==(*__._*)"},
- {"(*_.__*)=="},
- {"\\(*_._*)/"},
- };
- int main() {
- while(1) {
- system("clear");
- int pos_x = 0;
- printf("\033[10;20HWhere is my kitty?");
- for (pos_x = 1; pos_x < 70; pos_x++) {
- printf("\033[24;%dH\b %s", pos_x, cat[0]);
- fflush(stdout);
- usleep(50000);
- }
- for (pos_x = 70; pos_x > 0; pos_x--) {
- printf("\033[24;%dH%s ", pos_x, cat[1]);
- fflush(stdout);
- usleep(50000);
- }
- printf("\033[10;20HEhe-heeeeei, here is my kitty!");
- printf("\033[24;0H%s",cat[2]);
- fflush(stdout);
- sleep(2);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement