Rounding Numbers accurately
I am trying to find a simple solution to rounding numbers in C++. My dilemma is that I am doing a tax calculation that is .0875. When I use it in my calculation it rounds up perfect however when I add it to my end totals it loses .5 so therefore when I add all my totals up with the two percentage calculations I have..I lose 1 cent. How do I get this to not lose the .5.:confused:
Rounding Numbers accurately
I see where you going..sorta..lol!! Well, I came up with a solution and I would like someone to look it over. Can I post the code straight on here. It is a good amount. I like someone to see if I have any holes I am not catching at this moment. By the way when I used floor instead of ceiling it didn't do what I needed but I did come up with away to get around it.