大佬求教,为什么是3而不是3.5
c吧
全部回复
仅看楼主
level 1
星痕无言
楼主
rt
2022年10月18日 11点10分
1
level 11
microroom
去掉(7/2)的()
2022年10月18日 12点10分
2
星痕无言
懂了感谢大佬
2022年10月19日 00点10分
level 12
白き永遠
7/2=3
double(3)=3
要实现你想要的效果,可以写成(double)7/2
2022年10月18日 15点10分
3
星痕无言
谢谢大佬明白了
2022年10月19日 00点10分
level 8
NoelDev
因为他先计算了7/2的结果然后再转换成了double
2022年10月18日 15点10分
4
星痕无言
谢谢大佬,明白了
2022年10月19日 00点10分
1