|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include <stdio.h>
#define PI 3.14159
#define S(r) PI * r * r
#define C(r) PI * 2 * r
int main()
{
int r = 5
printf("半径为%d的圆,面积是;%.2f,周长是;%.2f\n",r,S(r),C(r));
return 0;
}
- 编译器名: TDM-GCC 4.9.2 64-bit Release
处理 C 源文件...
--------
- C 编译器: E:\fishc\Dev-Cpp\MinGW64\bin\gcc.exe
- 命令: gcc.exe "C:\Users\lenovo\Desktop\FishC\程序\作业5.2.c" -o "C:\Users\lenovo\Desktop\FishC\程序\作业5.2.exe" -I"E:\fishc\Dev-Cpp\MinGW64\include" -I"E:\fishc\Dev-Cpp\MinGW64\x86_64-w64-mingw32\include" -I"E:\fishc\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include" -L"E:\fishc\Dev-Cpp\MinGW64\lib" -L"E:\fishc\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib" -static-libgcc
C:\Users\lenovo\Desktop\FishC\程序\作业5.2.c: In function 'main':
C:\Users\lenovo\Desktop\FishC\程序\作业5.2.c:11:2: error: expected ',' or ';' before 'printf'
printf("半径为%d的圆,面积是;%.2f,周长是;%.2f\n",r,S(r),C(r));
^
编译结果...
--------
- 错误: 1
- 警告: 0
- 编译时间: 0.42s
把他复制到答案那个代码里面就可以运行
|
|