首页
编程
java
php
前端
首页
编程
java
php
前端
求π近似值为什么把n和sign的类型设为double运行就对了,为什么不能设置为int型?
int / int 是int,这个时候结果已经不准确了,然后才把int转成double,自然就不正确了
点击展开全文