Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace tochkavfigura
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. var h = double.Parse(Console.ReadLine());
  15. var x = double.Parse(Console.ReadLine());
  16. var y = double.Parse(Console.ReadLine());
  17.  
  18. if ( (x > 0 && x < 3*h) && y > 0 && y < h)
  19. Console.WriteLine("inside");
  20. else if ( (x > h && x < 2*h) && y > 0 && y < 4*h)
  21. Console.WriteLine("inside");
  22. else if ((x >= h && x <= 2 * h) && y >= 0 && y <= 4 * h)
  23. Console.WriteLine("border");
  24. else if ((x >= 0 && x <= 3 * h) && y >= 0 && y <= h)
  25. Console.WriteLine("Border");
  26. else
  27. Console.WriteLine("outside");
  28.  
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement