#include #include using namespace std ; int main() { cout << "*" << setw(10) << 17 << "*" << endl ; cout << "*" << setw(10) << "Heading1" << "*" << endl ; //setw needs to be applied to each output cout << "*" << "Heading2" << "*" << endl; cout << left << "---------------" << endl ; cout << "*" << setw(10) << 17 << "*" << endl ; cout << "*" << setw(10) << "Heading1" << "*" << endl; cout << fixed << setprecision(2) << 3.14959 << endl ; cout << right ; cout << fixed << setprecision(2) << setw(10) << 3.14159 << endl ; return 0; }