#include #include using namespace std; //Output the four numbers 0, 1, 2, 3, with the spacing requested by the user. int main() { cout << "Type 1 for single space, 2 for double space, etc. "; int spacing {1}; cin >> spacing; if (!cin) { cerr << "Sorry, that wasn't a number.\n"; return EXIT_FAILURE; } if (spacing <= 0) { cerr << "Sorry, the spacing must be positive.\n"; return EXIT_FAILURE; } for (int i {0}; i < 4; ++i) { cout << i << " -------------------"; for (int j {0}; j < spacing; ++j) { cout << "\n"; } } return EXIT_SUCCESS; }