Cody

Solution 2103636

Submitted on 23 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
x = 10; p=1; c=0.35; y_correct = 14; assert(isequal(bottle(x,p,c),y_correct))

n = 10 y = 10 b = 10 a = 0 a = 3.5000 n = 3 y = 13 b = 3 a = 0.5000 a = 1.5500 n = 1 y = 14 b = 1 a = 0.5500 a = 0.9000

2   Pass
x = 20; p=1.5; c=0.4; y_correct = 17; assert(isequal(bottle(x,p,c),y_correct))

n = 13 y = 13 b = 19.5000 a = 0.5000 a = 5.7000 n = 3 y = 16 b = 4.5000 a = 1.2000 a = 2.4000 n = 1 y = 17 b = 1.5000 a = 0.9000 a = 1.3000

Suggested Problems

More from this Author12