Advertisement
VasilIvanov

Untitled

Mar 29th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1.  
  2. int h = int.Parse(Console.ReadLine());
  3.  
  4. int x = int.Parse(Console.ReadLine());
  5.  
  6. int y = int.Parse(Console.ReadLine());
  7.  
  8.  
  9.  
  10. if ((x >= 0 && x <= h * 3 && y >= 0 && y <= h) || (x >= h && x <= h * 2 && y >= h && y <= h * 4))
  11.  
  12. {
  13.  
  14. if ((x > 0 && x < h * 3 && y > 0 && y < h) || (x > h && x < h * 2 && y > h && y < h * 4))
  15.  
  16. Console.WriteLine("inside");
  17.  
  18. else
  19.  
  20. {
  21.  
  22. if (x > h && x < h * 2 && y == h)
  23.  
  24. Console.WriteLine("inside");
  25.  
  26. else
  27.  
  28. Console.WriteLine("border");
  29.  
  30. }
  31.  
  32. }
  33.  
  34. else
  35.  
  36. Console.WriteLine("outside");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement