Write a method called anglePairs that accepts three angles (integers), measured in degrees, as parameters and returns

Question:

Write a method called anglePairs that accepts three angles (integers), measured in degrees, as parameters and returns whether or not there exist both complementary and supplementary angles among the three angles passed. Two angles are complementary if their sum is exactly 90 degrees; two angles are supplementary if their sum is exactly 180 degrees. Therefore, the method should return true if any two of the three angles add up to 90 degrees and also any two of the three angles add up to 180 degrees. For example, the call anglePairs(120, 60, 30) returns true. Assume that each angle passed is nonnegative.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: