解题思路:
这题自己代入自定义函数,按题目要求判断。
注意事项:
无。
参考代码:
#include<bits/stdc++.h>
using namespace std;
double x,y;
int hs(double x)
{
if(x<1)
y=x;
else
{
if(x<10)
y=2*x-1;
else
y=3*x-11;
}
}
int main(){
scanf("%lf",&x);
hs(x);
printf("%.2lf\n",y);
return 0;
}
0.0分
0 人评分