#include #include using namespace std; // This assignment is worth 5 points. // -1 if int was used to store the initial number. // -2 if fixed was not used // -1 if left was not used // -1 if setw() was not properly used const int col_width = 6; double number; int main() { cout << "Enter a number between 0 and 10: "; cin >> number; cout << "+--------+------+" << endl << "|multiple|number|" << endl << "+--------+------+" << endl; cout << left << setprecision(4) << fixed; // fixed only needs to be used once cout << "| 1 |" << setw(col_width) << number << '|' << endl; cout << setprecision(3); cout << "| 2 |" << setw(col_width) << number*2 << '|' << endl; cout << setprecision(2); cout << "| 3 |" << setw(col_width) << number*3 << '|' << endl; cout << setprecision(1); cout << "| 4 |" << setw(col_width) << number*4 << '|' << endl; cout << "+--------+------+" << endl; return 0; }