怎么错了呢
#include <stdio.h>
int main()
{
double num = 2.5; //定义浮点型变量num并赋值为2.5
int num1=(double)(num);
printf("num的整数部分是%d\n", num1);
return 0;
}
#include <stdio.h>
int main()
{
double num = 2.5; //定义浮点型变量num并赋值为2.5
int num1=(double)(num);
printf("num的整数部分是%d\n", num1);
return 0;
}
2019-10-15
举报