fork download
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5. int x1,y1,r,x,y,c;
  6. scanf("%d %d %d %d %d",&x1,&y1,&r,&x,&y);
  7. c=(sqrt((x-x1)*(x-x1)+(y-y1)*(y-y1)));
  8. if(c==r)
  9. {
  10. printf("on");
  11. }
  12. if(c==r)
  13. {
  14. printf("on");
  15. }
  16. if(c==r)
  17. {
  18. printf("on");
  19. }
  20. if(c<r)
  21. {
  22. printf("in");
  23. }
  24. if(c>r)
  25. {
  26. printf("out");
  27. }
  28. return 0;
  29. }
Success #stdin #stdout 0s 5548KB
stdin
46
stdout
out