Need help with C++ triangle problem, simple hopefully


Trying to code this C++ program, in which it will let me know if the point is within this triangle or not -

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 wrong, i'm not the best with math..

Please help.

Thanks in advance
Last edited on
Semicolons. You have them in bad places. Study

You will get the easy solutions for the different triangles programs, here is the link try this site.

It offers free Tutorials and Let Me Try online Editor for C, C++, C#, JAVA, HTML, CSS, JavaScript and more.

Check following link for your answer.

Last edited on
Topic archived. No new replies allowed.