已采纳回答 / Hibiko
给sum一个0.0,初始化sum的值,并给sum一个浮点类型。sum = 5/2,sum的值就是2,sum = 0.0sum = 5/2,sum的值就是2.5
2018-08-23