哪位大虾告诉我为什么会死循环呀
#include <stdio.h>#define PI 3.14159
void main()
{
double zhu(double x,double y);
double zhui(double x,double y);
double r,h,v1,v2,sum;
printf("请输入圆锥体、圆柱体的半径和高:");
scanf("%lf%lf",&r,&h);
do
{v1=zhu(r,h);
v2=zhui(r,h);
sum=v1+v2;
printf("圆锥体体积+圆柱体体积=%lf\n",sum);}
while(r!=0);
}
double zhu(double x,double y)
{
double v1;
v1=PI*x*x*y;
return (v1);
}
double zhui(double x,double y)
{
double v2;
v2=PI*x*x*y/3;
return(v2);
}