> 其他 >
用函数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:...
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版