Hang Man Code#include <stdio.h>
#include <stdlib.h> int main() { printf("(O_O)\n"); printf(" | \n"); printf("./|\\. \n"); printf(" | \n"); printf("_/ \\_ \n"); return 0; } |
Hang Man DetailsThe hang man code is a very basic code. The printf() just prints what ever is inside them on to your screen when the program is ran. In this code the printf()s would print out something that looks like a stickman on to your screen.
O_O | / | \ | _/ \_ |
Real Time Applications
The uses for printf() in general can be applied to almost any program. The use of the hang man character above could be used to build an actual working hang man game. The image could also be changed to what ever the programmer desires. One example could be making a pyramid or square.