Skip to content

Instantly share code, notes, and snippets.

@bulv1ne
Created May 29, 2014 10:36
Show Gist options
  • Save bulv1ne/b51dc9c6ea1bc2e560ab to your computer and use it in GitHub Desktop.
Save bulv1ne/b51dc9c6ea1bc2e560ab to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define CHICKENS 20
char *chicken[] = {
" MM\n"
"<' \\___/|\n"
" \\_ _/\n"
" ][\n"
"\n"
"Ordinary Chicken\n",
" MM\n"
"<' \\___/|\n"
" \\_ _/ O\n"
" ][\n"
"\n"
"Chicken Laying\n"
" an Egg\n",
" MM\n"
">' \\___/|\n"
" \\_ _/\n"
" ][\n"
"\n"
"Crowing Chicken\n",
" MM\n"
"<' \\___/|\n"
" \\_ _/\n"
" ]!\n"
"\n"
"Chicken with\n"
" Wooden Leg\n",
" MM\n"
"<' \\___/|\n"
" ][\n"
"\n"
"Rooster\n",
" MM\n"
"<' \\___/|\n"
"/ \\\n"
"\n"
"Jogging Chicken\n",
" ____\n"
" /____\\\n"
"\\_________/\n"
"\n"
"Chicken Soup\n",
" MM\n"
"\n"
" WW\n"
"\n"
"Falling Chicken\n",
" MM MM\n"
"<' \\__/ `>\n"
" \\_ _/\n"
" ][\n"
"\n"
"Siamese Twin\n"
" Chicken\n",
" _--_\n"
" / \\\n"
" | |\n"
" \\____/\n"
"\n"
"Chicken in an\n"
" Early State\n",
" MM\n"
"<` \\___/|\n"
" \\_ _/.\n"
" ][ *\n"
"No Comment\n",
" ///\n"
"<' \\___/|\n"
" \\_ _/\n"
" \\ \\\n"
"\n"
"Racing Chicken\n",
" MM\n"
" <' \\___/|\n"
"u/ \\_ _/\n"
" ][\n"
"\n"
"Chicken Smoking\n"
" a Pipe\n",
" MM\n"
" o>' \\___/|\n"
" O \\_ _/\n"
"() ][\n"
"\n"
"Puking Chicken\n",
" MM |\n"
" <' \\___/|\n"
" \\_ _/\n"
" ][\n"
"\n"
" Chicken Leading a\n"
"Japanese Tourist Group\n",
" |\n"
" MM\n"
"=' \\___/|\n"
" \\_ _/\n"
" ][\n"
"\n"
"Whistling\n"
" Chicken\n",
" MM\n"
"<' \\_____/|\n"
" \\_ _ /\n"
" ][ ][\n"
"\n"
"Four-Legged\n"
" Chicken\n",
" MM\n"
"<@ \\___/|\n"
" \\____/\n"
" ><\n"
"\n"
"Stoned Chicken\n",
" MM\n"
" |\\___/ `>\n"
" \\_ _/\n"
" ][\n"
"\n"
" Chicken Looking in\n"
"the other Direction\n",
" MM\n"
" <' \\___/|\n"
" \\ /\n"
"~~~~~~~~~~~~~~~\n"
"\n"
"Chicken that Thinks\n"
" it is a Duck\n"
};
int main(int argc, char** argv)
{
srand(time(NULL));
int c;
if (argc > 1)
{
int number = atoi(argv[1]);
if (number == 0)
{
printf("The arg must be a number man\n");
printf("Do it like this:\n");
printf("%s 5\n", argv[0]);
printf("There are 20 chickens out there\n");
printf("Can you find them all?\n\n");
c = rand() % CHICKENS;
}
else
{
c = (number - 1) % CHICKENS;
}
}
else
{
c = rand() % CHICKENS;
}
printf("%s\n", chicken[c]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment