为何这个程序运行的时候,输入任何数,y都等于If
#include <stdio.h>
#include <math.h>
int main( )
{double x,y;
scanf("%If", &x);
if(x>=0&&x<=10)
y=sin(x);
else
if(x>=10&&x<20)
y=cos(x);
else
if(x>=20&&x<30)
y=exp(x)-1;
else
if (x>=30&&x<40)
y=log(x-1);
else
y=pow(x,4);
printf("y=%If\n",y);
return 0;
}