java里面小数定义为float不可以么?

2025-06-24 13:14:08
推荐回答(2个)
回答1:

float x=2.5f;
float y=4.7f;

回答2:

可能是强制转换的优先级问题
a%3*((int)(x+y))%2/4 这样试试看