#include #include #include using namespace std; int main() { char s[] = "John Doe"; double d = 10.00; ios_base::fmtflags save = cout.flags(); cout << "Pay to the order of " << s << " the amount of\n" << "Pay to the order of " << setfill('*') << setw(10) << s << " the amount of\n" << "Pay to the order of " << left << setw(10) << s << " the amount of\n" << "Pay to the order of " << right << setw(10) << s << " the amount of\n" << internal << fixed << showpos << setprecision(2) << setfill(' ') << setw(7) << d << "\n"; cout.setf(save, ios_base::adjustfield); //restore only the 3 flags cout << "Pay to the order of " << setw(10) << s << " the amount of\n"; return EXIT_SUCCESS; }