#include #include #define STICKMAN_HEIGHT 3 #define STICKMAN_WIDTH 3 int main() { int height, width; int top, bottom, left; int i,j; printf("Enter the height of the box> "); scanf("%d",&height); printf("Enter the width of the box> "); scanf("%d",&width); if(height < STICKMAN_HEIGHT) { printf("Error. Box too small.\n"); exit(-1); } if(width < STICKMAN_WIDTH) { printf("Error. Box too narrow.\n"); exit(-1); } top = (height-STICKMAN_HEIGHT) / 2; bottom = height - ( top + STICKMAN_HEIGHT); // Top for(i=0; i < width+2; i++) printf("-"); printf("\n"); for(i = 0; i < top; i++) { printf("|"); for(j=0; j < width; j++) { printf(" "); } printf("|\n"); } left = (width - STICKMAN_WIDTH) / 2; // Stickman!! printf("|"); for(i = 0; i < left; i++) printf(" "); printf(" 0 "); for(i=left+STICKMAN_WIDTH; i