/* Note:Your choice is C IDE */ #include "stdio.h" void main() { float h,r,l,s,sq,vq,vz; float pi=3.1415926; scanf("%f,%f",&r,&h); l=2*pi*r; s=r*r*pi; sq=4*pi*r*r; vq=4.0/3.0*pi*r*r*r; printf("l=%6.2f\n",l); printf("s=%6.2f\n",s); printf("sq=%6.2f\n",sq); printf("vq=%6.2f\n",vq); printf("ID:2013914103"); }
总结:根据数学公式算圆的周长,面积,球的体积