+ 1
Given three integer numbers and knowing that they form a valid triangle as:(int side1, int side2, int side3), how can I use a single c++ statement to test if an angle is obtuse
3 Réponses
+ 1
If the squares of one side is langer than the sum of squares of the other sides, the opposite angle is obtuse.
0
Just find the longest side and use the law of cosines only once.
0
Karl is right it is much easier