Advertisement
Guest User

Kitty:3

a guest
Apr 19th, 2014
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <unistd.h>
  4.  
  5. char cat[3][11] = {
  6. {"==(*__._*)"},
  7. {"(*_.__*)=="},
  8. {"\\(*_._*)/"},
  9. };
  10.  
  11. int main() {
  12. while(1) {
  13. system("clear");
  14. int pos_x = 0;
  15.  
  16. printf("\033[10;20HWhere is my kitty?");
  17.  
  18. for (pos_x = 1; pos_x < 70; pos_x++) {
  19. printf("\033[24;%dH\b %s", pos_x, cat[0]);
  20. fflush(stdout);
  21. usleep(50000);
  22. }
  23.  
  24. for (pos_x = 70; pos_x > 0; pos_x--) {
  25. printf("\033[24;%dH%s ", pos_x, cat[1]);
  26. fflush(stdout);
  27. usleep(50000);
  28. }
  29.  
  30. printf("\033[10;20HEhe-heeeeei, here is my kitty!");
  31. printf("\033[24;0H%s",cat[2]);
  32. fflush(stdout);
  33. sleep(2);
  34.  
  35. }
  36.  
  37. return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement