大师傅

Nicole  •  11天前


#include <stdio.h>

int main() {
double a, b, c, e;
int d;
scanf("%lf", &a);
d = a + 0.99999;
if (d <= 150) {
	c = d * 0.4463;
	printf("%.1lf", c);
}
if (400 >= d && d > 150) {
	b = (d - 150) * 0.4663 + 150 * 0.4463;
	printf("%.1lf", b);
}
if (400 < d) {
	e = (d - 400) * 0.5663 + (400 - 150) * 0.4663 + 150 * 0.4463;
	printf("%.1lf", e);
}
return 0;
}

评论:

请先登录,才能进行评论