不好意思,我不知道什么叫宏常量,我试着编了一下,您看看
#include
int main() {
double r =5.3;
double a =3.14159;
printf ("Area=%f\n",(long)a*r*r);
printf ("circumference=%f\n",2*a*r);
}
#define r = 5.3;
#define PI = 3.14159;
int main()
{
float Area = PI*r*r/2;
float circumference = PI*r+2*r;
printf("%f,%f",Area,circumference);
return 0;
}