c++ program. I don't know how to get all my outputs to end with exactly 2 decimal places?

making a small program that calculates the deductions off of a pay check (i.e. federal taxes). i need the outputs to all end with two decimal places and all my constants and declared variables are doubles.

1 Answer

? Favorite Answer

  • Use iomanip.

    tutorial:

    http://www.cprogramming.com/tutorial/iomanip.html

  • Leave a Comment