|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- #include <stdio.h>
- #define FQ 3.7
- #define JL 7
- #define XQ 3.7
- #define KXC 8
- #define YC 2
- #define YOUCAI
- #define HG 6
- #define BLB 0.5
- int main()
- {
- float xm;
- float xh;
- float xjy;
- xm = (2 * FQ + KXC + YOUCAI) * 0.5;
- xh = (3 * XQ + 0.5 * YC + 5 * HG) * 0.5;
- xjy = (10 * HG + 20 * BLB) * 0.5;
- printf("小明需要支付%2.f元\n",xm);
- printf("小红需要支付%2.f元\n", xh);
- printf("小甲鱼需要支付%2.f元\n", xjy);
- return 0;
- }
- ~
复制代码
这样写报错:
2.c: In function ‘main’:
2.c:18: error: expected expression before ‘)’ token
2.c:22: error: stray ‘\357’ in program
2.c:22: error: stray ‘\274’ in program
2.c:22: error: stray ‘\214’ in program
2.c:22: error: expected ‘)’ before ‘xm’
是不是不能这样写?还是哪里搞错了?
|
|