y=x2(x<0)
-0.5x+10(0≤x<10)
x-√x(x≥10)
y=x2 这是x * 2 ,还是x的平方?
#include <stdio.h>
#include <math.h>
int main()
{
double x,y;
scanf("%lf",&x);
if(x< 0)
y = x*x;
else if(x<10)
y = x/2+10;
else
y = x-sqrt(x);
printf("%lf",y);
}