I need help with this...this is my fourth week in C++ online class, and it is going pretty bad. There are some errors on my code, mainlly where the equal signs are, and the declared sides. take a look. I would appreciate any help.
// Russell_Glen_Lab2_2.cpp : Defines the entry point for the console application.
//
cout << "Enter the side of the angle you want to solve";
cin >> side1 >> side2 >> side3;
cin >> side1 = (pow(side2,2) + pow(side3,2)) endl;
cin >> side2 = (pow(side1,2) - pow(side3,2)) endl;
cin >> side3 = (pow(side1,2) - pow(side2,2)) endl;
if (side1 < 0 && side2 < 0 && side3 < 0) //False means that triangle is not right triangle
return false; // true means triangle is right triangle
else if (side2 + side3 = side1 || side1 - side3 = side2 || side1 - side2 = side3)
return true;
Bluehailex...thank you, I changed the last cin lines to cout <<, and changed the equal signs to the conditional logig of ==. That got rid of just about all of my errors. I am still having a problem with the equal signs in the equation area...anything look wrong there? here is the new code:
cout << "Enter the side of the angle you want to solve";
cin >> side1 >> side2 >> side3;
cout << side1 = (pow(side2,2) + pow(side3,2));
cout << side2 = (pow(side1,2) - pow(side3,2));
cout << side3 = (pow(side1,2) - pow(side2,2));
if (side1 < 0 && side2 < 0 && side3 < 0) //False means that triangle is not right triangle
return false; // true means triangle is right triangle
else if (side2 + side3 == side1 || side1 - side3 == side2 || side1 - side2 == side3)
return true;
else return false;
system ("pause")
return 0;
}
I thought I declared everything...but the equal signs in the declaration eqns are still red.