I'm making a small calculator using C++. The problem is that I used "fixed" to show the decimal points for non-integer values. So, even if I write 1+1 to get 2, it will write as 1.000000 + 1.000000 = 2.000000. (Picture:http://i656.photobucket.com/albums/uu283/3xcru1t1at3r/annoyingpoints.png?t=1311956882)
Is there anyway to remove the excess decimal points? I tried cout.precision, but it will either truncate non-integer values, or still leave the decimal points there.
While I'm at this, I just want to ask if there is anyway to increase the accuracy. I'm making a nth-term Fibonacci Series too, and it works fine up to the 70th term. But at 71st and above, the accuracy drops and the number will be different.
(Picture:http://i656.photobucket.com/albums/uu283/3xcru1t1at3r/fibboaccu.png?t=1311957366)
So is there anyway to increase the accuracy?
Thanks. :)