Cody

Solution 1673454

Submitted on 14 Nov 2018
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   Fail
P= 100000; old_rate=10.25% new_rate=10.00% y_correct = 250; assert(isequal(saving(P,old_rate,new_rate),y_correct))

old_rate = 10.2500 new_rate = 10

Undefined function or variable 'x'. Error in saving (line 2) y = x*0.0025; Error in Test1 (line 5) assert(isequal(saving(P,old_rate,new_rate),y_correct))

2   Fail
P= 500000; old_rate=10.25% new_rate=10.00% y_correct = 1250; assert(isequal(saving(P,old_rate,new_rate),y_correct))

old_rate = 10.2500 new_rate = 10

Undefined function or variable 'x'. Error in saving (line 2) y = x*0.0025; Error in Test2 (line 5) assert(isequal(saving(P,old_rate,new_rate),y_correct))

3   Fail
P= 500000; old_rate=10.00% new_rate=9.75% y_correct = 1250; assert(isequal(saving(P,old_rate,new_rate),y_correct))

old_rate = 10 new_rate = 9.7500

Undefined function or variable 'x'. Error in saving (line 2) y = x*0.0025; Error in Test3 (line 5) assert(isequal(saving(P,old_rate,new_rate),y_correct))