Advertisement
DasShelmer

3.1.19

Oct 12th, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. int main() {
  6.     setlocale(LC_ALL, "Russian");
  7.     const double r2 = 100; // Радиус умнож. на 2
  8.     double x, y;
  9.     cout << "Введите точку(x,y):" << endl;
  10.     cin >> x >> y;
  11.  
  12.     if ((y == abs(x) && r2 >= pow(x, 2) + pow(y, 2)) || (r2 == pow(x, 2) + pow(y, 2) && y <= abs(x)))
  13.         cout << "На границе";
  14.     else if (y < abs(x) && r2 > pow(x, 2) + pow(y, 2))
  15.         cout << "Да";
  16.     else
  17.         cout << "Нет";
  18.     cout << endl;
  19.     main();
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement