#include"stdio.h"
#include"math.h"
void main()
{
double x,y;
printf("请输入x的值:");
scanf("%f",&x);
if(x<3)
y=3*x*x+3*x+7;
else
if(x>=6)
y=sqrt(x+2*sin(3*x));
else
y=(pow(((x-4)/(x+5)),3));
printf("输出y的值:%f",y);
}

scanf("%f",&x);
修改为scanf("%lf", &x);