圆球的体积?看看我的程序对吗?C语言的知道了圆球的半径,求体积#define PI 3.14159#includevoid main(){ double r,s;printf(Piease input r:);scanf(%f,&r);s=(4/3)*PI*r*r*r;printf(s=%f,s);}
网友回答
#define PI 3.14159
#include
void main()
{ double r,s;
//将此处的double改成float型printf(Piease input r:);
scanf(%f,&r);
s=(4/3)*PI*r*r*r;
//将此处4/3改写成4.0/3.0
printf(s=%f,s);
}