Advertisement
Skalefou

Cat ASCII Art

Nov 19th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.22 KB | None | 0 0
  1. //ASCII art et code source par Skalefou.
  2. #include <stdio.h>
  3. #include <windows.h>
  4.  
  5. void color(int couleurDuTexte,int couleurDeFond);
  6.  
  7. int main(int argc, char **argv)
  8. {
  9.     int i = 0;
  10.    
  11.     while(1) //5
  12.     {
  13.         i++;
  14.         color(i, 0);
  15.         printf("  _______     /%c                     /%c     _______\n", 92, 92);
  16.         printf(" / | | | %c   /  %c                   /  %c   / | | | %c \n", 92, 92, 92, 92);
  17.         printf(" |       |  /    %c_________________/    %c  |       |\n", 92, 92);
  18.         printf(" |       |  |     ____       ____       |  |       |\n");
  19.         printf(" |       |  |    / /%c %c     / /%c %c      |  |       |\n", 92, 92, 92, 92);
  20.         printf(" |       |  |    %c_%c/_/     %c_%c/_/      |  |       |\n", 92, 92, 92, 92);
  21.         printf(" |       |  |                       |  |       |\n");
  22.         printf(" |       |  |            /%c             |  |       |\n", 92);
  23.         printf(" |       |_/                             %c_|       |", 92);
  24.    
  25.        
  26.        
  27.         Sleep(500);
  28.         system("cls");
  29.         if(i == 15)
  30.         {
  31.             i = 0;
  32.         }
  33.     }
  34.     return 0;
  35. }
  36.  
  37.  
  38. void color(int couleurDuTexte,int couleurDeFond) // fonction d'affichage de couleurs
  39. {
  40.         HANDLE H=GetStdHandle(STD_OUTPUT_HANDLE);
  41.         SetConsoleTextAttribute(H,couleurDeFond*16+couleurDuTexte);
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement