#include<stdio.h>
#define PI 3.14
void main()
{
float r;
float surface(float);
float circumference(float);
printf("\n 请输入半径r:");
scanf("%f",&r);
printf("the surface is %.2f, and the circumference is %.2f",surface(r),circumference(r));
}
float surface(float r)
{
float sur;
sur=PI*r*r;
return sur;
}
float circumference(float r)
{
float cir;
cir=2*PI*r;
return cir;
}
你可以给我解释一下你自定义的函数?