#include #include #include #include #define SIZE 50 using namespace std; char str[SIZE]; int a[4]; char pole[7][35]; char comp[6][6] = {"+---+", "| |", "+ +", " +", " |", "| "}; int digits[10][7] = {{0,1,1,2,1,1,0}, {3,4,4,3,4,4,3}, {0,4,4,0,5,5,0}, {0,4,4,0,4,4,0}, {2,1,1,0,4,4,3}, {0,5,5,0,4,4,0}, {0, 5,5,0,1,1,0}, {0, 4,4,3,4,4,3}, {0,1,1,0,1,1,0}, {0,1,1,0,4,4,0}}; void fce(int pos, int num) { int shift = pos*7; for(int i=0; i<7; i++) { for(int j=0; j<5; j++) { pole[i][shift+j] = comp[digits[num][i]][j]; } pole[i][shift+5] = ' '; pole[i][shift+6] = ' '; } } void fce2(int pos, int num) { int shift = 15 + pos*7; for(int i=0; i<7; i++) { pole[i][shift] = ' '; pole[i][shift+1] = ' '; for(int j=0; j<5; j++) { pole[i][shift+j+2] = comp[digits[num][i]][j]; } } } int main() { while(true) { fgets(str, SIZE, stdin); if(str[0] == 'e') { printf("end\n"); return 0; } a[0] = str[0] - '0'; a[1] = str[1] - '0'; a[2] = str[3] - '0'; a[3] = str[4] - '0'; for(int i=0; i<2; i++) { fce(i, a[i]); } for(int i=0; i<7; i++) { pole[i][14] = ' '; } pole[2][14] = pole[4][14] = 'o'; for(int i=0; i<2; i++) { fce2(i,a[i+2]); } for(int i=0; i<7; i++) { for(int j=0; j<29; j++) printf("%c", pole[i][j]); printf("\n"); } for(int i=0; i<2; i++) printf("\n"); } return 0; }