分类: C/C++
2014-11-26 23:01:27
#include
int main()
{
double r,h;
double l,S,s_b,V,V_z;
scanf("%lf",&r);
scanf("%lf",&h);
l=2*3.14*r;
S=r*r*3.14;
s_b=4*r*r*3.14;
V=4/3*3.14*r*r*r;
V_z=3.14*r*r*h;
printf("圆的周长 %lf\n",l);
printf("圆的面积 %lf\n",S);
printf("圆的表面积 %lf\n",s_b);
printf("圆的体积 %lf\n",V);
printf("圆柱的体积 %lf\n",V_z);
return 0;
}