Home /
Expert Answers /
Computer Science /
the-coding-language-is-matlab-40-points-given-the-length-of-three-sides-of-a-triangle-write-a-pro-pa993
(Solved): the coding language is MATLAB (40 points) Given the length of three sides of a triangle, write a pro ...
the coding language is MATLAB
(40 points) Given the length of three sides of a triangle, write a program to calculate the three interior angles of the triangle in degrees. Assume that the sum of any two sides is greater than the third side. Program Inputs - Enter side a: - The user will always enter a positive number, no crror checking needed. - Enter side b: - The user will always enter a positive number, no crror checking needed. - Enter side c: - The user will always enter a positive number, no error cheding nended Program Outputs - Angle \( \mathbf{A} \) is \( \mathrm{XX} \) degrees, angle \( \mathbf{B} \) is \( \mathrm{YY} \) degrees and angle \( \mathrm{C} \) is \( \mathrm{ZZ} \) degrees! - Replace XX, YY and \( Z Z \) with the degrees of the respective angles. Round of the angles to the nenrest degree. Sample Output The following test cases do not cover all possible scenarios (develop your own!) but should indicate if your code is on the right track. To guarantee full credit, your program's output should exactly match the output below. Test Case 1: Enter side a: 3 Enter aide b: 4 Enter side c: 5 Angle A is 37 degrees, angle \( \mathrm{B} \) is 53 degrees and angle \( \mathrm{C} \) is 90 degrees!
Test Case 2: Enter side a: 8 Enter side b: 16 Enter side c: 12 Angle \( A \) is 29 degrees, angle B is 104 degrees and angle C is 47 degrees! Test Case 3: Enter side a: 56 Enter side b: 45 Enter side \( c: 88 \) Angle \( A \) is 33 degrees, angle \( B \) is 26 degrees and angle \( C \) is 121 degrees! Test Case 4: Enter side a: 12 Enter side b: 12 Enter side c: 12 Angle A is 60 degrees, angle \( \mathrm{B} \) is 60 degrees and angle C is 60 degrees