#include #include #include #include #include using namespace std; void printing(char n,int l) { if (n == '0') { if (l == 0 || l == 6) { cout << "+---+" ; } else if (l == 3) { cout << "+ +"; } else { cout << "| |"; } } if (n == '1') { if (l == 0 || l == 3 || l == 6) { cout << " +"; } else { cout << " |"; } } if (n == '2') { if (l == 0 || l == 3 || l == 6) { cout << "+---+"; } else if (l == 1 || l == 2 ){ cout << " |"; } else { cout << "| "; } } if (n == '3') { if (l == 0 || l == 3 || l == 6) { cout << "+---+"; } else { cout << " |"; } } if (n == '4') { if (l == 0) { cout << "+ +"; } else if (l==2 || l==1){ cout << "| |"; } else if ( l==3 ) { cout << "+---+"; } else if (l==4 || l==5){ cout << " |" ; } else { cout << " +"; } } if (n == '5') { if (l == 0 || l == 3 || l == 6) { cout << "+---+"; } else if (l == 1 || l == 2 ){ cout << "| "; } else { cout << " |"; } } if (n == '6') { if (l == 0 || l == 3 || l == 6) { cout << "+---+"; } else if (l == 1 || l == 2 ){ cout << "| "; } else { cout << "| |"; } } if (n == '7') { if (l == 0) { cout << "+---+"; } else if (l == 1 || l == 2 || l==4 || l==5){ cout << " |"; } else { cout << " +"; } } if (n == '8') { if (l == 0 || l == 3 || l == 6) { cout << "+---+"; } else { cout << "| |"; } } if (n == '9') { if (l == 0 || l == 3 || l == 6) { cout << "+---+"; } else if (l == 1 || l == 2 ){ cout << "| |"; } else { cout << " |"; } } } int main () { string line; while (!cin.eof()) { getline (cin, line, '\n'); if (line.compare("end") == 0) break; char first = line.at(0); char second = line.at(1); char third = line.at(3); char fourth = line.at(4); for (int i = 0; i < 7; i++) { printing(first,i); cout << " "; printing(second,i); if (i==2||i==4) cout << " o "; else cout << " "; printing(third,i); cout << " "; printing(fourth,i); cout << endl; } cout << endl << endl ; } cout << "end"; return 0; }