How do I remove the leading zeros during output. I have tried google, but the results I found always have to do with strings. I am using doubles to calculate my answer. Is there a member function of cout (setf, precision, etc..) that removes leading zeros. And by leading zeros I mean: