我真的不知道下一步该怎么做
#include <stdio.h>
int main()
{
double num = 2.5;
double num = (int) num;
(int) num = int num; //定义浮点型变量num并赋值为2.5
printf("num的整数部分是%d\n", num);
return 0;
}
#include <stdio.h>
int main()
{
double num = 2.5;
double num = (int) num;
(int) num = int num; //定义浮点型变量num并赋值为2.5
printf("num的整数部分是%d\n", num);
return 0;
}
2020-06-07
举报