this shouldn't pass the test. this kindda glitch could be avoided if more test were added.
Hello, bainhome. I agree that more test cases should be included in the Test Suite (a minimum of four cases). It would be instructive if you could suggest specific test cases which this submission wouldn't pass. —DIV
One such test case would be x=1, p=1, c=0.9; the correct solution for this should be y=1.
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))
|
2 | Pass |
x = 20;
p=1.5;
c=0.4;
y_correct = 17;
assert(isequal(bottle(x,p,c),y_correct))
|
Make the vector [1 2 3 4 5 6 7 8 9 10]
35547 Solvers
1600 Solvers
401 Solvers
find the maximum element of the matrix
348 Solvers
Solving Quadratic Equations (Version 1)
427 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!