Advertisement
Tanina80

06. Point on Rectangle Border 2

Jun 28th, 2016
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _06.Point_on_Rectangle_Border
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. var x1 = int.Parse(Console.ReadLine());
  10. var y1 = int.Parse(Console.ReadLine());
  11. var x2 = int.Parse(Console.ReadLine());
  12. var y2 = int.Parse(Console.ReadLine());
  13. var x = int.Parse(Console.ReadLine());
  14. var y = int.Parse(Console.ReadLine());
  15.  
  16. if (x1 < x2 && y1 < y2)
  17.  
  18. {
  19.  
  20. if (x > x1 && x < x2)
  21. {
  22. if (y == y1 || y == y2) Console.WriteLine("Border");
  23. }
  24.  
  25. else
  26.  
  27. if (y > y1 && y < y2)
  28. {
  29. if (x == x1 || x == x2) Console.WriteLine("Border");
  30. }
  31.  
  32. else
  33.  
  34. Console.WriteLine("Inside / Outside");
  35. }
  36.  
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement