int型乘以float型,float型先变成int型再相乘。相同存一个数占用空间double>float>int
但是可以表达的数的范围double>float>int
int只能表达整数。
一般用int即能表达的数字就不用float只有精度或大小有需要时才使用float及double。
匿名回答于2024-05-22 23:13:32