用函数cylinder (r,h )计算圆柱体的体积.哪位高手能帮我看看我这里到底出了什么错!#includeint 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
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/28 08:29:22
![用函数cylinder (r,h )计算圆柱体的体积.哪位高手能帮我看看我这里到底出了什么错!#includeint main(){double h,r,v;double cylinder(double r,double h);printf(](/uploads/image/z/5925237-69-7.jpg?t=%E7%94%A8%E5%87%BD%E6%95%B0cylinder+%28r%2Ch+%29%E8%AE%A1%E7%AE%97%E5%9C%86%E6%9F%B1%E4%BD%93%E7%9A%84%E4%BD%93%E7%A7%AF.%E5%93%AA%E4%BD%8D%E9%AB%98%E6%89%8B%E8%83%BD%E5%B8%AE%E6%88%91%E7%9C%8B%E7%9C%8B%E6%88%91%E8%BF%99%E9%87%8C%E5%88%B0%E5%BA%95%E5%87%BA%E4%BA%86%E4%BB%80%E4%B9%88%E9%94%99%21%23includeint+main%28%29%7Bdouble+h%2Cr%2Cv%3Bdouble+cylinder%28double+r%2Cdouble+h%29%3Bprintf%28%22Enter+r+and+h%22%29%3Bscanf%28%22%25f%25f%22%2C%26r%2C%26h%29%3Bv%3Dcylinder%28r%2Ch%29%3Bprintf%28%22v%3D%253.f%5Cn)
用函数cylinder (r,h )计算圆柱体的体积.哪位高手能帮我看看我这里到底出了什么错!#includeint 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
用函数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;
}
用函数cylinder (r,h )计算圆柱体的体积.哪位高手能帮我看看我这里到底出了什么错!#includeint 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
#include
#define PI 3.1415926
main()
{
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:");
scanf("%f",&h);
v=PI*r*r*h;
printf("v=%3.f",v);
}