|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- #include<stdio.h>
- #define A "3.14"
- #define NAME "李先生"
- #define C "2020"
- #define D "3"
- #define E "15"
- main()
- {
- printf("圆周率是%.2f\n",A);
- printf("对%s来说,%d年%d月%d日是很重要的日子\n",NAME,C,D,E);
- return 0;
- }
复制代码
运行后就显示
Debug Error!
Program: E:\1网课\C语言\Debug\P5 define.exe
runtime error
(Press Retry to debug the application)
- #include<stdio.h>
- #define A 3.14
- #define NAME "李先生"
- #define C "2020"
- #define D "3"
- #define E "15"
- int main()
- {
- printf("圆周率是%.2f\n", A);
- printf("对%s来说,%s年%s月%s日是很重要的日子\n", NAME, C, D, E);
- return 0;
- }
复制代码
|
|