依恋女装:c++ monthlyPayment为何用double定义?不用int?

来源:百度文库 编辑:高校问答 时间:2024/04/29 19:49:12

用int的话会截去小数点后面的部分
从而使得结果误差较大
用double更为精确一点