Laitofai

[2]BQ | Разветвл. алгоритмы

Dec 4th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     double x,y,r;
  8.     cin>>x>>y;
  9.     r=sqrt(x*x+y*y);
  10.     if(x>0||x<-20||y>20||y<-20){cout<<"NO";}
  11.     if(y<=0){
  12.         if(x>-10&&y>-10){cout<<"NO";}else{if(r<=20){cout<<"YES";}else{cout<<"NO";}}
  13.     }else{if(r>=10)cout<<"YES";}
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment