这个C语言的题怎么做?

2025-04-16 04:30:41
推荐回答(4个)
回答1:

#include
#include
int main()
{
    int price;
    float s;
    scanf("%d %f",&price,&s);
    if(price>=99999||price<=100) return 0;
    if(s>=10||s<=1) return 0;
    s/=10;
    int result=price*s;
    int t=result%10;
    if(t>=5) result+=10;
    result-=t;
    printf("%d\n",result);
    system("pause");
    return 0;
}

//说明:编译运行环境是dev-c

回答2:

#include 

int main(void)
{
double a;
while(scanf("%lf%%",&a)!=EOF)
{
printf("%g\n",a/100);
}
return 0;
}

回答3:

图好模糊。。。

回答4:

图片看不清楚啊,捉急