#include<stdio.h>
int main(void)
{
double r,h,v;
printf("Enter r,h:");
scanf("%lf%lf",&r,&h);
if(r<0,h<0){
printf("sorry you enter is wrony!\n");
}
else{
v=3.1415926*r*r*h;
printf("%.3f\n",v);
}
}
转载于:https://www.cnblogs.com/2013djj/p/3378470.html