I have 2 float values as
A = 0.0306880000
B = 0.0396640000
When I use printf to print as "%5.3f"
, A value is printed as 0.031
and B values is printed as 0.040
. When I add the two values together, I get the answer 0.070
(which is 0.0306880000 + 0.0396640000).
How do I include only 3 decimal points to be taken in to the addition so that the answer would be 0.071
(0.031 + 0.040).