Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class PointInTheFigure
- {
- static void Main(string[] args)
- {
- var h = int.Parse(Console.ReadLine());
- var x = int.Parse(Console.ReadLine());
- var y = int.Parse(Console.ReadLine());
- string result = "";
- if ((x > 0 && x < (3 * h) && y > 0 && y < h))
- {
- result = "inside";
- }
- else if ((x > h && x < (2 * h) && y >= h && y < (4 * h)))
- {
- result = "inside";
- }
- else if (!(x >= 0 && x <= (3 * h) && y >= 0 && y <= h) && !(x >= h && x <= (2 * h) && y >= h && y <= (4 * h)))
- {
- result = "outside";
- }
- else
- {
- result = "border";
- }
- Console.WriteLine(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement