double类型问题
考一下大家!!!
题一:qty=?
double a = 504, b = 0.1, c = 0.1;
double qty = a * b / c;
再来
题二:qty=?
double a = 505, b = 0.1, c = 0.1;
double qty = a * b / c;
题一:504.00000000000006
题二:505.0
考一下大家!!!
题一:qty=?
double a = 504, b = 0.1, c = 0.1;
double qty = a * b / c;
再来
题二:qty=?
double a = 505, b = 0.1, c = 0.1;
double qty = a * b / c;
题一:504.00000000000006
题二:505.0