Need help with IF statement + Math

Hello

Trying to code this C++ program, in which it will let me know if the point is within this triangle or not - http://imgur.com/vOdbffL

Need help with the IF statement.

What I have -

if (x >= 0 && x <= 200);
{
if (y >= 0 && y <= -0.5 * x + 100);
{

inTheTriangle = true;

}
}




I know i'm probably doing the y part wrong, i'm not the best with math..

Please help.

Thanks in advance
Topic archived. No new replies allowed.