未了 - 云代码空间
——
#include<stdio.h>
#define Pi 3.14159
double Square(double r){
return Pi * r * r;
}
double Perimeter(double r){
return 2 * Pi * r;
}
int main(){
double r;
printf("请输入圆的半径:\n");
while(scanf("%lf",&r)!= EOF){
printf("圆的面积是%lf\n",Square(r));
printf("圆的周长是%lf\n",Perimeter(r));
printf("请输入圆的半径:\n");
}
return 0; //退出
}