P51 第九题
输入某个点A的平面坐标(x,y),判断(输出)A点是在圆内,圆外还是在圆周上,其中圆心坐标为(2,2),半径为1
#include <stdio.h>
int main()
{ int x,y,a;scanf("%d\n",&x); scanf("%d",&y); printf("your location(%d,%d)\n",x,y); a=(x-2)*(x-2)+(y-2)*(y-2); if(a==1)printf("you are online!"); if(a<1) printf("you are inside!\n"); if(a>1) printf("you are outside!\n"); return 0;
}