请高手帮小菜我看看这个程序哪错了?
如题,请帮忙解决一下,多谢!源程序:
#include <stdio.h>
int main(int argc, char *argv[])
{
int x,y;
scanf("%d",&x);
if (x<-1)
{
y=x*x-1;
printf("y=%d",y);
}
else
{if (-1<=x<=1)
y=x*x;
printf("y=%d",y);}
else
{y=x*x+1;
printf("y=%d",y);}
return 0;
}
多谢高手!