I try to sum upp some float values in c++, 65769.59+13.95 = 65783.54 using calculator, but i get 65783.55 in my c++ code why?
I tried
float t_amount = 13.95;your text
float total_amount = 65769.59;
char buf[20];
sprintf_s(buf, “%.2f”, t_amount);
total_amount += (float)atof(buf);