圆体积
#include<stdio.h> int main(void) { int i,n; double r,h,x; double cylinder(double r,double h); printf("Enter n:"); scanf("%d",&n); for(i=1;i<=n;i++){ printf("Enter r , h:"); scanf("%lf%lf",&r,&h); if((r>0)||(h>0)) { x=cylinder(r,h); printf("x=%.3f\n",x); } else{ printf(Wrong!make it again \n); } } return 0; } double cylinder(double r,double h) { double result; result=3.1415926*r*r*h; return result; }
问题:为什么显示wrong没有定义,不是只是输出wrong就可以么