Cody

Solution 1024609

Submitted on 20 Oct 2016 by Massimo Zanetti
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
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 ans = 250

2   Pass
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 ans = 1250

3   Pass
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 ans = 1250