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;
- using System.Threading.Tasks;
- namespace Point_in_the_figure
- {
- class Program
- {
- static void Main(string[] args)
- {
- int x = int.Parse(Console.ReadLine());
- int y = int.Parse(Console.ReadLine());
- bool fig1 = false;
- bool fig2 = false;
- bool fig3 = false;
- //Top figure
- if (x >= 4 && x<=10 && y <= -3 && y >= -5)
- {
- fig1 = true;
- }
- //Middle figure
- if (x >= 1 && x <= 12 && y <= 1 && y >= -3)
- {
- fig2 = true;
- }
- //Bottom figure
- if (x >= 4 && x <= 10 && y <= 3 && y >= 1)
- {
- fig3 = true;
- }
- if(fig1||fig2||fig3 )
- {
- Console.WriteLine("in");
- }
- else
- {
- Console.WriteLine("out");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement