Cody

Solution 2097048

Submitted on 18 Jan 2020
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   Fail
x = 1+2i; y_correct = 3; assert(isequal(sumImagNum(x),y_correct))

Assertion failed.

2   Fail
x = -5-2i; y_correct = -7; assert(isequal(sumImagNum(x),y_correct))

Assertion failed.

3   Fail
x = 14*i; y_correct = 14; assert(isequal(sumImagNum(x),y_correct))

Assertion failed.

4   Pass
x = 8; y_correct = 8; assert(isequal(sumImagNum(x),y_correct))