C++第九题20150327

来源:互联网 发布:mac推荐网址下载软件 编辑:程序博客网 时间:2024/05/21 11:19

#include <stdio.h>
#include <math.h>
int main ()

{
 int x,y;
 printf("please input x&y");
 scanf("%d%d",&x,&y);
 
  double A;
  A = sqrt(pow((x-2),2) + pow((y-2),2));
 
 if (A<1)
 printf("A在圆内");
  else if(A == 1)
 printf("A在圆上");
 else
  printf("A在圆外");

  return 0 ;
}

 

0 0