Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Globalization;
- namespace HM_4_Judge
- {
- class Program
- {
- static void Main(string[] args)
- {
- var h = decimal.Parse(Console.ReadLine());
- var x = decimal.Parse(Console.ReadLine());
- var y = decimal.Parse(Console.ReadLine());
- decimal x1 = 3 * h;
- decimal y1 = h;
- decimal x2 = h;
- decimal y2 = 4 * h;
- if (x > 0 && x < x1 && y > 0 && y < y1)
- {
- Console.WriteLine("inside");
- }
- else if (x > h && x < 2*h && y > 0 && y < y2)
- {
- Console.WriteLine("inside");
- }
- else if (x >= 0 && x <=3*h && y >= 0 && y <= h)
- {
- Console.WriteLine("border");
- }
- else if (x >= h && x <= 2*h && (y == 0 || (y >=h && y <= 4*h)) )
- {
- Console.WriteLine("border");
- }
- else
- {
- Console.WriteLine("outside");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment