Created
November 23, 2020 04:58
-
-
Save xavierskip/028ce7e66b6ee869e7a64a0486cc9e8e to your computer and use it in GitHub Desktop.
a wave flag
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int main(){ | |
char f0[] = "/\\\n||^-----------\n||^###########|\n||^###########|\n||^###########|\n||^-----------\n|| \n||\n||\n||"; | |
char f1[] = "/\\\n||-^----------\n||#^##########|\n||#^##########|\n||#^##########|\n||-^----------\n|| \n||\n||\n||"; | |
char f2[] = "/\\\n||--^---------\n||##^#########|\n||##^#########|\n||##^#########|\n||--^---------\n|| \n||\n||\n||"; | |
char f3[] = "/\\\n||---^--------\n||###^########|\n||###^########|\n||###^########|\n||---^--------\n|| \n||\n||\n||"; | |
char f4[] = "/\\\n||----^-------\n||####^#######|\n||####^#######|\n||####^#######|\n||----^-------\n|| \n||\n||\n||"; | |
char f5[] = "/\\\n||-----^------\n||#####^######|\n||#####^######|\n||#####^######|\n||-----^------\n|| \n||\n||\n||"; | |
char f6[] = "/\\\n||------^-----\n||######^#####|\n||######^#####|\n||######^#####|\n||------^-----\n|| \n||\n||\n||"; | |
char f7[] = "/\\\n||-------^----\n||#######^####|\n||#######^####|\n||#######^####|\n||-------^----\n|| \n||\n||\n||"; | |
char f8[] = "/\\\n||--------^---\n||########^###|\n||########^###|\n||########^###|\n||--------^---\n|| \n||\n||\n||"; | |
char f9[] = "/\\\n||---------^--\n||#########^##|\n||#########^##|\n||#########^##|\n||---------^--\n|| \n||\n||\n||"; | |
char f10[] = "/\\\n||----------^-\n||##########^#|\n||##########^#|\n||##########^#|\n||----------^-\n|| \n||\n||\n||"; | |
char f11[] = "/\\\n||-----------^\n||###########^|\n||###########^|\n||###########^|\n||-----------^\n|| \n||\n||\n||"; | |
char f12[] = "/\\\n||------------\n||############|\n||############|\n||############|\n||------------\n|| \n||\n||\n||"; | |
char *flags[13] = {f0,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12}; | |
int frame=0; | |
while (1){ | |
if(frame == 13){ | |
frame=0; | |
} | |
printf("%s\n", flags[frame]); | |
// https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/usleep.3.html | |
usleep(100000); | |
system("clear"); | |
frame += 1; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment