Cody

Solution 1997158

Submitted on 31 Oct 2019 by Nikolaos Nikolaou
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
alpha1 = 30; alpha2 = 40; r1 = 20; r2 = 15; p1 = 1.5; p2 = 1.4; p = pizza_comp(alpha1, r1, p1, alpha2, r2, p2); p_correct = 1; assert(isequal(p, p_correct));

a1 = 69.8132 a2 = 56.0999 p = 1

2   Pass
alpha1 = 30; alpha2 = 40; r1 = 20; r2 = 17; p1 = 1.5; p2 = 1.3; p = pizza_comp(alpha1, r1, p1, alpha2, r2, p2); p_correct = 2; assert(isequal(p, p_correct));

a1 = 69.8132 a2 = 77.6000 p = 2

3   Pass
alpha1 = 28; alpha2 = 40; r1 = 20; r2 = 16; p1 = 1.28-3.1250e-04; p2 = 1.17; p = pizza_comp(alpha1, r1, p1, alpha2, r2, p2); p_correct = 0; assert(isequal(p, p_correct));

a1 = 76.3768 a2 = 76.3768 p = 0