Hello guys. I just had a quick question.
I've got a program that is supposed to display information about net pay, social security withheld, etc. and thus needs to show dollar amounts like "1.00" instead of just "1"
How do I do that? I've got it all working otherwise. Everything is declared as floats and all that.
Last edited on
You also need to use the fixed flag.
cout << fixed << setprecision( 2 ) << 3.14159 << endl;