double avg1 = 86.5;//输出avg1=86.5
int avg2 = (int)avg1;//输出avg2 = 86
强制类型转换
最新推荐文章于 2024-03-06 09:24:12 发布
double avg1 = 86.5;//输出avg1=86.5
int avg2 = (int)avg1;//输出avg2 = 86