#include #include using namespace std; int main () { cout << "How many rows (e.g, 10)?"; int nrows {0}; cin >> nrows; if (!cin) { cerr << "Sorry, that wasn't a number.\n"; return EXIT_FAILURE; } cout << "How many columns (e.g, 10)? "; int ncols {0} cin >> ncols; if (!cin) { cerr << "Sorry, that wasn't a number.\n"; return EXIT_FAILURE; } cout << "How many rows of blanks in each box (e.g, 1)?" int nrowblanks {0} cin >> nrowblanks; if (!cin) { cerr << "Sorry, that wasn't a number.\n"; return EXIT_FAILURE } cout << "How many columns of blanks in each box (e.g, 3)?"; int ncolblanks {0} cin >> ncolblanks; if (!cin) { cerr << "Sorry that wasn't a number.\n"; return EXIT_FAILURE } for (int r {0}; i < nrows; i++) { for (int j {0}; j < ncols; j++) { cout << "+"; for (int k = 0; k < ncolblanks; k++) { cout << "-"; } } cout << "+\n"; for (int m = 0; m < nrowblanks; m++) { for (int j = 0; j < ncols; j++) { cout << "|"; for (int k = 0; k < ncolblanks; k++) { cout << " "; } } cout << "|\n"; } } for (int j = 0; j < ncols; j++) { cout << "+"; for (int k = 0; k < ncolblanks; k++ { cout << "-"; } } cout << "+\n"; return EXIT_SUCCESS }