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