c语言程序题:x<5,y=0;x>=5&&x<=10,y=sinx;x>10,y=sinx+cosx.请会的朋友进来指导
#include <math.h>
main ()
{
float x,y;
scanf("%.2f",&x);
if(x<5)
{y=0;
printf("%.2f",y);
}
if(x>=5&&x<=10)
{y=sin(x);
printf("%.2f",y);
}
if(x>=10)
{y=sin(x)+cos(x);
printf("%.2f",y);
}
fflush(stdin);
getchar ();
}
就是当x<5,y=0;x>=5&&x<=10,y=sinx;x>10,y=sinx+cosx.为啥怎么运行都是0.00呢?