int main() { float r, c, s;printf("请输入圆的半径:\n");scanf("%f", &r);circle(r, &c, &s);printf("圆的周长为:%f\n", c);printf("圆的面积为:%f\n", s);return 0;void circle(float r, float* c, float* s) { c = 2 * PI * r;s = PI * r * r;程...
int main(){ float r,area,perimeter;printf("请你输入圆的半径r:\n");scanf("%f",&r);area=pi*r*r;perimeter=pi*r*2;printf("直径为:%0.02f\n圆的面积为:%0.03f\n周长为:%0.02f",2*r,area,perimeter);return 0;}
return(_area);}int main(){ float r,a,b; scanf("%f",&r); a=perimeter(r); b=area(r); printf("perimer=%g,area=%g\n",a,b); system("
C++语言——求圆的面积和周长 C++语⾔——求圆的⾯积和周长 时间限制: 1 Sec 内存限制: 128 MB 题⽬描述 输⼊圆的半径r(r为实数),求圆的⾯积和周长(pi为3.1415926)。(保留两位⼩数) 输⼊ 输⼊圆的半径r 输出 两⾏,第⼀⾏圆的周长,第⼆⾏圆的⾯积 (结果保留两位⼩数) 样例...