Cody

Problem 46588. i was a mistake

Solution 2954116

Submitted on 16 Sep 2020 by Samiu Haque
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; b = 0; n = 1; s_correct = 1; assert(isequal(ihaveaproblem(a,b,n),s_correct))

2   Pass
a = 1; b = 0; n = 2; s_correct = 1; assert(isequal(ihaveaproblem(a,b,n),s_correct))

3   Pass
a = 1; b = 0; n = 3; s_correct = 2; assert(isequal(ihaveaproblem(a,b,n),s_correct))

4   Pass
a = 0; b = 1; n = 1; s_correct = 1i; assert(isequal(ihaveaproblem(a,b,n),s_correct))

5   Pass
a = 1; b = 1; n = 8; s_correct = 3 - 9i; assert(isequal(ihaveaproblem(a,b,n),s_correct))

6   Pass
a = 2; b = 1; n = 6; s_correct = -34 + 53i; assert(isequal(ihaveaproblem(a,b,n),s_correct))

Suggested Problems

More from this Author3

Community Treasure Hunt

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

Start Hunting!