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