I'm with bumsfeld on this one. You want as much precision as you can get throughout the program's calculations and only round for the display. You don't even want to round the number itself, just the display.
If you round prematurely, all your calculations will be slightly off. And the more calculations you do, the more inaccurate your answer.
It may be quite possible that the data rounded off is not used for calculations or used in calcultions which requires only the rounded off values. It could also be written to a file and used only for data analysis purposes, or maybe the OP had some other idea in his mind or maybe it was part of an assignment given at the college to test his coding skills, you never know.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 720
Failure as a human
Offline 8,872 posts
since Jun 2006