用函数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;
}
人气:482 ℃ 时间: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关于输入半径和高,利用函数的方式实现计算圆柱体的体积答案
- 过故人庄这首诗的内容
- Are your a musician?Can you sing?中有什么语法,
- 在△ABC中,AD,BE,CF是三条高,交点为H,延长H交外接圆于点M,实证:DH=DM
猜你喜欢
- 再次麻烦已知1/2=1-1/2;1/6=1/2x3=1/2-1/3;1/12=1/3x4=1/3-1/4 求:5/6-7/12+9/20-1/30+13/42=?
- 1.Welcome to the party!
- 若a、b互为相反数,c、d互为倒数,且|c|=—(—1),c的平方+2cd—a+b除以2c
- 关于班风不正,学风不正的作文
- x为消费商品的数量,Y为消费X件商品共得的总效用,求第4件商品的边际效用?
- 已知方程组{x-2y+4z=0,2x+3y-13z=0,且xyz≠0,求代数x+y+z/x+y-z的值
- 一个最简分数,分子加1,分数值等于1;分母加1,分数值等于3分之2.问原分数是多少?
- 帮忙分析一下这个WITH引导的独立主格结构