萌新上路,自学,运行后有错误,可能错的很愚蠢,请大神指点
#include<stdio.h>main()
{
float ri,hi,vi;
float v(float,float);
printf("r: h:\n");
scanf("%f%f",&ri,&hi);
vi=v(ri,hi);
printf("v=%f\n",&vi);
}
float v(float r,float h)
{
float pi=3.1415926;
float rty;
rty=pi*r*r*h;
return rty
}