#include
#define POCKETMONEY 10 //定义常量及常量值 int main() { // POCKETMONEY = 12; //小明私自增加零花钱对吗? printf("小明今天又得到%d元零花钱\n", POCKETMONEY); return 0; }#include <stdio.h>
int main()
{
double num = 2.5; //定义浮点型变量num并赋值为2.5
int num1 = (int)num;
printf("num的整数部分是%f\n", num);
printf("num的整数部分是%d\n", num1);
return 0;
}