实验三 第二题

#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
",V);
    }
    else{
        printf("输入错误,请重新输入");
    }
    return 0;
}
原文地址:https://www.cnblogs.com/jlg0322/p/3367789.html