# include <stdio.h>
# include <math.h>
main()
{
float x,y;
scanf("%f",&x);
if(x<0)
{
y=fabs(x);
}
else if(x>=0&&x<2)
{
y=pow(x+1,1.0/2.0);
}
else if(x>=2&&x<4)
{
y=pow(x+2,5);
}
else if(x>=4)
{
y=2*x+5;
}
printf("%.2f",y);
}
1085
最新推荐文章于 2024-10-10 20:38:54 发布