User types value of x and y which will be a coordinate. There is some kind of a shape there and I need to tell if that coordinate will be outside, inside or on the border of that shape. I know how to do that with rectangle shape, but not with triangle or circle. Currently I need to do this with this shape: http://i.imgur.com/5teZk85.png
How do I do this for circle or triangle shape?
For rectangle I used these code lines:
IF (x>=-5) AND (x<=2) AND (y>=-1) AND (y<=3) then
IF (x=-5) OR (x=2) OR (y=-1) OR (y=3) then
writeln('Dot is located on line')
else writeln('Dot is located inside')
else writeln('Dot is located outside');