Cody

Solution 1757925

Submitted on 22 Mar 2019 by Steven Beumer
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
a = 1; r= 0.1; n=10; y_correct = a*(1 - r^n)/(1-r); assert(isequal(your_fcn_name(a,r,n),y_correct))

2   Pass
a = 0.2; r= 0.2; n=5; y_correct = a*(1 - r^n)/(1-r); assert(isequal(your_fcn_name(a,r,n),y_correct))

3   Pass
a = 0.4; r= 0.3; n=7; y_correct = a*(1 - r^n)/(1-r); assert(isequal(your_fcn_name(a,r,n),y_correct))