简单题,我写的代码进入死循环了,我想知道哪儿错了。
#include<stdio.h>int main()
{
float x,y,s1,s2,s3,s4,s5;
while(scanf("%d %d",&x,&y)!=-1)
{
s1=x*x+y*y;
s2=(x-2)*(x-2)+(y-2)*(y-2);
s3=(x+2)*(x+2)+(y-2)*(y-2);
s4=(x-2)*(x-2)+(y+2)*(y+2);
s5=(x+2)*(x+2)+(y+2)*(y+2);
if(s1<=1||s2<=1||s3<=1||s4<=1||s5<=1)
printf("10\n");
else
printf("0\n");
}
return 0;
}
求各种批评