What is your problem?
Do you want the output to be like this:(suppose tax=0.053)
--------------------------------Tax--------------0.05
?
//Before Tax 32 blanks and after Tax 14 blanks.
I think you might not be able to get 0.05, right?
This is because setprecision() should be used together
with "showpoint" or "fixed".
You can try this:
cout << "\t\t\t\t" << setiosflags(ios:left) << setw(17)
<< "Tax" << setiosflags(ios:fixed) << setprecision(2)
<< tax << endl << endl;