r/programminghelp • u/Poki_Foo • Oct 06 '20
C++ How to get trailing zeroes without using setprecision
Im working on a project that requires me to do basic arithmetic functions on x and y. My teacher wants us to display 0.0 when doing something like 3.0 - 3.0. The x and y variables are double. I know double automatically displays 0. Is there a way to have the double display 0.0 without using setprecision?
Thank you
4
Upvotes
0
u/[deleted] Oct 06 '20
[deleted]