Cody

Problem 44394. How to calculate the length of a triangle's side given two angles and one side

Solution 2100877

Submitted on 21 Jan 2020 by Asif Newaz
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
alpha = 30; beta=40; c=1; a_correct = 0.5300; assert(isequal(triangles(alpha,beta,c),a_correct))

gamma = 110 a = 0.5321 a = 0.5300

2   Pass
alpha = 1; beta=70; c=0.5; a_correct = 0.0100; assert(isequal(triangles(alpha,beta,c),a_correct))

gamma = 109 a = 0.0092 a = 0.0100

3   Pass
alpha = 40; beta=100; c=0.2; a_correct = 0.200; assert(isequal(triangles(alpha,beta,c),a_correct))

gamma = 40 a = 0.2000 a = 0.2000

4   Pass
alpha = 1; beta=1; c=11; a_correct = 5.5; assert(isequal(triangles(alpha,beta,c),a_correct))

gamma = 178 a = 5.5008 a = 5.5000

5   Pass
alpha = 37; beta=62; c=3; a_correct = 1.8300; assert(isequal(triangles(alpha,beta,c),a_correct))

gamma = 81 a = 1.8280 a = 1.8300

Suggested Problems

More from this Author1