用函数cylinder (r,h )计算圆柱体的体积.
哪位高手能帮我看看我这里到底出了什么错!
#include
int main()
{
double h,r,v;
double cylinder(double r,double h);
printf("Enter r and h");
scanf("%f%f",&r,&h);
v=cylinder(r,h);
printf("v=%3.f\n",v);
return 0;
}
人气:241 ℃ 时间:2020-06-02 02:58:56
解答
#include #define PI 3.1415926main(){float h,r,v;v=cylinder(r,h);/*printf("%3.f\n",v);*/return 0;} cylinder( float r,float h){float v;printf("Enter r :");scanf("%f",&r);printf("Enter h:...
推荐
- C++ 定义一个函数,功能为计算圆柱体的体积,并编写主函数,输入半径和高,调用函数求出圆柱体体积
- c++:建立一个类cylinder,cylinder的构造函数被传递了两个double值,分别表示圆柱体的半径和高度,
- 圆柱体内接于高为h,底半径为r的圆锥体内,设圆柱体高为x ,试将圆柱体的底半径y和体积v分别表示为x的函数
- 已知圆柱体的高为30厘米,画出圆柱体体积与底面积函数关系图像.
- VF关于输入半径和高,利用函数的方式实现计算圆柱体的体积答案
- WE COULDN'T CHOOSE WHERE WE WILL BE BORN.这句话对吗?
- 集合A.B定义A-B={x|x∈A,且x¢B},A*B=(A-B)∪(B-A)若A={1,3,5}B={3,5,7,9}则A*B=
- 数学中心对称图形定理
猜你喜欢