Cody

Solution 2174749

Submitted on 25 Mar 2020 by Mandar Nalavade
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
n = 6; out = 8; assert(isequal(next_fibonacci(n),out));

temp = 2

2   Pass
n = [12 40 50]; out = [13 55 55]; assert(isequal(next_fibonacci(n),out));

temp = 2 temp = 7 temp = 10

3   Pass
n = 10.^(1:5); out = [13 144 1597 10946 121393]; assert(isequal(next_fibonacci(n),out));

temp = 2 temp = 7 temp = 12 temp = 17 temp = 21

4   Pass
n = round(7.^(3:.5:7)); out = [377 987 2584 6765 17711 46368 121393 317811 832040]; assert(isequal(next_fibonacci(n),out));

temp = 2 temp = 14 temp = 16 temp = 18 temp = 20 temp = 22 temp = 24 temp = 26 temp = 28