显示结果对了,但是感觉不对,
#include <stdio.h>
int main()
{
double num = 2.5; //定义浮点型变量num并赋值为2.5
int mun = (int)mun;
printf("num的整数部分是%d\n",mun);
return 0;
}
#include <stdio.h>
int main()
{
double num = 2.5; //定义浮点型变量num并赋值为2.5
int mun = (int)mun;
printf("num的整数部分是%d\n",mun);
return 0;
}
2020-07-28
举报