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
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.
Step by Step Solution
3.34 Rating (175 Votes )
There are 3 Steps involved in it
nested ifs with solution public static boolean anglePairs int al int a2 i... View full answer
Get step-by-step solutions from verified subject matter experts
