各位能看一下错哪了吗,新手QAQ
查看原帖
各位能看一下错哪了吗,新手QAQ
1467543
jianglingxixi楼主2024/10/15 20:59
#define PI 3.14
#include<stdio.h>
int main()
{
    double V, r, h, n;
    scanf("%lf %lf", &h, &r);
    V = PI * r * r * h;
    if ( 20000% V==0){ 
    n=(double)20000/V;
    }
    else
    {
        n=(double)(20000/V)+1;
    }
    printf("%lf", n);
}
2024/10/15 20:59
加载中...