cout << "It's a TRIANGLE!" << endl;
}
else
cout << "NOT a TRIANGLE!";
return 0;
}
I:\Documents and Settings\Waters\Desktop\jodi3\main.cpp||In function 'int main()':|
I:\Documents and Settings\Waters\Desktop\jodi3\main.cpp|19|warning: left-hand operand of comma has no effect|
I:\Documents and Settings\Waters\Desktop\jodi3\main.cpp|19|error: invalid operands of types 'void*' and 'double' to binary 'operator+'|
I:\Documents and Settings\Waters\Desktop\jodi3\main.cpp|19|error: label 'a' used but not defined|
||=== Build finished: 2 errors, 1 warnings ===|
First, let me say that your math may be wrong.
Second, you don't need to #include <cmath> for plus and greater than.
Third, commas don't work like that. You need the if statement to be if (a+b>c&&a+c>b&&b+c>c). && is the "and" operator and means that both requirements must be true.
But now I am running it... and number like 8, 7, and 1... are saying it makes a triangle! *Please excuse me ignorace here... but are we sure those numbers make a triangle... Every numbers I put in are coming up as! It's a Triangle! is my math right?