标签:ret 输出 class amp 格式 can include pre ble
输入底面半径 r 和高 h ,输出圆柱体的表面积,保留三位小数,格式见样例
样例输入:
3.5 9
样例输出:
Area =274.889
1 #include<stdio.h> 2 #include<math.h> 3 int main() 4 { 5 const double pi=acos(-1.0); 6 double r,h,s; 7 scanf("%lf%lf",&r,&h); 8 s=2.0*pi*r*r+2*pi*r*h; 9 printf("Area=%.3f\n",s); 10 return 0;11 }
标签:ret 输出 class amp 格式 can include pre ble
原文地址:https://www.cnblogs.com/xybz/p/9977747.html