60分2,5war求大家帮忙,在自己的程序软件上是对的
查看原帖
60分2,5war求大家帮忙,在自己的程序软件上是对的
1290501
hgdhjgj楼主2024/3/5 17:24
#include<stdio.h>
int main(){
    int n;
    double t;
    scanf("%d",&n);
    if(n<=400){
        if(n<=150){
            t=n* 0.4463;
           printf("%.1lf",t); 
        }else{
            t=150*0.4463+(n-150)*0.4663;
            printf("%.1lf",t);
        }
    }else{
        t=150*0.4463+(400-150)*0.4663+(n-400)*0.5663;
        printf("%,1lf",t);
    }
    return 0;
}
2024/3/5 17:24
加载中...