Quote (ShadowFiend @ Jan 18 2013 07:47pm)
Use floats or doubles instead of int of your variables. For example, int g = 0.45 will be equal to 0. If you place it as float or double, it will display / do the math correctly. I would suggest changing them all.
To clean it up, i highly suggest not using variables like a,b,c,d,f,g,etc... Use names like Volume, Cost, TotalCost. Names that we can clearly see what they are without comments.
As for the # of decimals, just add this to your code
cout.precision(#);
Just need to add it once at the start of your program.
Replace # by a number
don't you need to include iomanip for precision or is that something else?