I trying to create a program that deals with money, and have it all figured out except one portion...I can't get all the decimals to have a monetary look, meaning only two decimal places. I know I can setprecision(2), and that would work for most numbers, but what if the number are mixed in their length?
Example of what I'm getting:
$12.501
$1254.0
$124.15
$10321
$1.1254
Is it possible to have them all round out to only two decimal places?