Cody

Solution 2102825

Submitted on 23 Jan 2020 by Andrew Tran
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
a = 1; b = 2; c = 3; d = 4; flag_correct = false; assert(isequal(isTherePythagoreanTriple(a, b, c, d),flag_correct))

flag = logical 0 Z = 61.2815 Z = 131.8103 A = 1 B = 3 Z = 109.4712 Z = 44.4775 Z = 78.5904 A = 1 B = 3 Z = 63.0679

2   Pass
a = 2; b = 3; c = 4; d = 5; flag_correct = true; assert(isequal(isTherePythagoreanTriple(a, b, c, d),flag_correct))

flag = logical 0 Z = 78.5904 Z = 138.5904 A = 2 B = 4 Z = 120 Z = 60.4481 Z = 90 flag = logical 1 A = 2 B = 4 Z = 76.7083

3   Pass
a = 3; b = 4; c = 5; d = 6; flag_correct = true; assert(isequal(isTherePythagoreanTriple(a, b, c, d),flag_correct))

flag = logical 0 Z = 90 flag = logical 1 Z = 143.1301 A = 3 B = 5 Z = 126.8699 Z = 71.8103 Z = 98.2530 A = 3 B = 5 Z = 86.4427

4   Pass
a = 3; b = 4; c = 4.5; d = 5; flag_correct = true; assert(isequal(isTherePythagoreanTriple(a, b, c, d),flag_correct))

flag = logical 0 Z = 104.5443 Z = 152.7340 A = 3 B = 4.5000 Z = 131.8103 Z = 90 flag = logical 1 Z = 117.2882 A = 3 B = 4.5000 Z = 101.0280

5   Pass
a = 3; b = 3.5; c = 4; d = 5; flag_correct = true; assert(isequal(isTherePythagoreanTriple(a, b, c, d),flag_correct))

flag = logical 0 Z = 109.6354 Z = 151.0450 A = 3 B = 4 Z = 138.5904 Z = 81.2969 Z = 97.5571 A = 3 B = 4 Z = 90 flag = logical 1

Suggested Problems

More from this Author10