I am having a few problems writing a program for my class. I have to write a program that allows the user to input his name and gross salary. After that I have to show how much money is being taken away due to taxes. So for example things like federal and state taxes medicare SS pension and health insurance. These things I have some understanding. The problem is that I have to include an output file. How would I do that? Also I have to include the iomanip library but I don't know why that is needed. Another thing is how do I set number to only show up to two decimal places? And finally how would I use setw() right/left to justify the text.
Iomanip is a library with useful functions, including a setprecision() that will allow you to round floats to two decimal places as well setw() that lets you set the column width.