题目坑点
这题目输入的半径也必须是double类型
#include<stdio.h>
int main()
{
double r;
double area,perimeter;
double pi = 3.14159;
scanf("%lf",&r);
perimeter = 2*pi*r;
area = pi*r*r;
printf("%.6lf\n",perimeter);
printf("%.6lf",area);
return 0;
}
int main()
{
double r;
double area,perimeter;
double pi = 3.14159;
scanf("%lf",&r);
perimeter = 2*pi*r;
area = pi*r*r;
printf("%.6lf\n",perimeter);
printf("%.6lf",area);
return 0;
}