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;
- namespace Point_in_the_Figure
- {
- class Program
- {
- static void Main(string[] args)
- {
- var h = int.Parse(Console.ReadLine());
- var x = int.Parse(Console.ReadLine());
- var y = int.Parse(Console.ReadLine());
- if ((x<h && y>h ) || (x>2*h && y>h) || (x<0) || (x>3*h) || (y<0) || (y>4*h))
- {
- Console.WriteLine("outside");
- }
- else if ((x>0 && x<3*h && y>0 && y<h) || (x>h && x<2*h && y<4*h && y>0))
- {
- Console.WriteLine("inside");
- }
- else
- {
- Console.WriteLine("border");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment