计算圆柱体的体积
#include<stdio.h>double cylinder(double r,double h);/*函数声明*/
int main(void)
{
double height,radius,volume;
printf("Enter radius and height:");
scanf("%lf%lf",&radius,&height);
volume=cylinder(radius,height);/*调用函数,返回值赋给v*/
printf("Volume=%.3f\n",volume);
return 0;
}
/*定义求圆柱体积的函数*/
double cylindeer(double r,double h)
{
double result;
result=3.1415926*h*r*r;
return result;
}
请问为什么编译不出来??
谢谢!!!
[此贴子已经被作者于2017-11-17 16:45编辑过]