窝久布用韩束
2026-09-12 16:26:18
发布于:广东
6阅读
0回复
0点赞
代码如下
#include<bits/stdc++.h>
using namespace std;
int main() {
double x,y;
cin>>x;
if(x>=0 && x<5)y=-x+2.5;
else if(x>=5 && x<10)y=2-1.5*(x-3)*(x-3);
else if(x>=10 && x<20)y=x/2-1.5;
printf("%0.3f",y);
}
这里空空如也







有帮助,赞一个