#include#define PI 3.1415926void main(){double r,S,V;printf("请输入半径值:\n");scanf("%lf",&r);S=4*PI*r*r;V=4.0/3*PI*r*r*r;printf("球的表面积为:%.2lf\n",S);printf("球的体积为:%.2lf\n",V);}
#include //#include void main(){const float PI=3.1415926;float r=0.0;float s=0.0;scanf("%f",&r);printf("S=%.2f",PI*r*r);system("pause");}