求助 输入这串代码但是3以上的数字就会错误!
#include <stdio.h>#include <math.h>
int main()
{
float x,y;
scanf("%f",&x);
if(x<1)
{
y=x+1;
}
else if(x<=3&&x>=1)
{
y=2*sqrt(x)-1;
}
else y=cos(x+3);
printf("y=%.2f",y);
return 0;
}
2018-10-24 11:28
2018-10-24 21:46