#include<stdio.h> int main(void) { double R,H,V; printf("Enter R and H:"); scanf("%lf%lf",&R,&H); if(R>0&&H>0){ V=3.1415926*R*R*H; printf("V=%.3f\n",V); } else{ printf("输入错误,请重新输入"); } return 0; }