课后作业SIE5
#include <stdio.h>#define PI 3.14159
#define S(r) PI * r * r
#define C(R) 2 * PI * r
int main()
{
int r = 5;
printf("半径为%d的圆,面积是:%.2f,周长是:%.2f\n",r S(r),C(R));
return 0;
}
一脸蒙圈...
printf("半径为%d的圆,面积是:%.2f,周长是:%.2f\n",r,S(r),C(R));
r和S(r) 之间少了个逗号
#include <stdio.h>
#define PI 3.14159
#define S(r) PI * r * r
#define C(R) 2 * PI * r
int main()
{
int r = 5;
printf("半径为%d的圆,面积是:%.2f,周长是:%.2f\n",r,S(r),C(R));
return 0;
}
页:
[1]