Sep 16, 2013 at 12:25am
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 wrong, i'm not the best with math..
Please help.
Thanks in advance
Last edited on Sep 16, 2013 at 12:28am
Sep 16, 2013 at 12:15pm
Hi,
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.
http://www.cbtsam.com/cppl2/cbtsam-cppl2-074.php
Last edited on Sep 18, 2013 at 5:17am