[ad_1]
I believe what you want is something like this:
cout << std::setprecision(1) << a+b;
[ad_2]
solved Loss of precision on adding doubles [duplicate]
[ad_1]
I believe what you want is something like this:
cout << std::setprecision(1) << a+b;
[ad_2]
solved Loss of precision on adding doubles [duplicate]