用函数cylinder (r,h )计算圆柱体的体积.

问题描述:

用函数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;
}

#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:...