Cody

Problem 134. Geometric series

Solution 3261223

Submitted on 18 Oct 2020 by Payam Morsali
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
t1=1; r=1; n=7; y_correct = 7; assert(isequal(your_fcn_name(t1,r,n),y_correct))

y = 0 y = 1 y = 2 y = 3 y = 4 y = 5 y = 6 y = 7

2   Pass
t1=10; r=10; n=5; y_correct = 111110; assert(isequal(your_fcn_name(t1,r,n),y_correct))

y = 0 y = 10 y = 110 y = 1110 y = 11110 y = 111110

3   Pass
t1=7; r=3; n=5; y_correct = 847; assert(isequal(your_fcn_name(t1,r,n),y_correct))

y = 0 y = 7 y = 28 y = 91 y = 280 y = 847

Suggested Problems

More from this Author100

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!