Advertisement
Dimique

Untitled

May 22nd, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <math.h>
  4.  
  5. using namespace std;
  6.  
  7. bool adlv(double cx, double cy, double r, double x, double y)
  8. {
  9.     if ((x + cx)*(x + cx) + (y + cy)*(y + cy) < r)
  10.         return true;
  11.     else
  12.         return false;
  13. }
  14.  
  15. int main()
  16. {
  17.     double cx, cy, x, y, r;
  18.     cin >> cx >> cy >> r >> x >> y;
  19.     cout << adlv(cx, cy, r, x, y);
  20.     system("pause");
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement