I have something like
double d1=4.0;
double d2=8.0;
I am trying to print sum of those double values using cout
.
Is it possible to print the sum with exact precision without setting the precision?
If the values are
double d1=4.23;
double d2=4.0;
The sum should print 8.23
without any additional zeros.