Created
October 23, 2019 20:35
-
-
Save alvinneocom/c76f8b8bc5d2c6d7589c831eefbc6bd2 to your computer and use it in GitHub Desktop.
yes
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
void hangman(int wrong) | |
{ | |
for(int rowcounter = 0; rowcounter <= 3; rowcounter++) | |
{ | |
if(rowcounter == 0) | |
{ | |
printf("----\n"); | |
} | |
if(rowcounter == 1) | |
{ | |
printf("| "); | |
if(wrong > 0) | |
{ | |
printf("o"); | |
} | |
printf("\n"); | |
} | |
if(rowcounter == 2) | |
{ | |
printf("| "); | |
if(wrong == 2) | |
{ | |
printf(" |"); | |
} | |
if(wrong == 3) | |
{ | |
printf("/|"); | |
} | |
if(wrong > 3) | |
{ | |
printf("/|\\"); | |
} | |
printf("\n"); | |
} | |
if(rowcounter == 3) | |
{ | |
printf("| "); | |
if(wrong == 5) | |
{ | |
printf("/"); | |
} | |
if(wrong == 6) | |
{ | |
printf("/ \\"); | |
} | |
printf("\n"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment