Cody

Solution 2022757

Submitted on 15 Nov 2019 at 9:35
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=508; assert(isequal(altsum(x),508))

a = 0.0039 y = 0.0039

Assertion failed.

2   Fail
x=[1692 591]; assert(isequal(altsum(x),1101))

a = 0.0012 0.0051 y = 0.0063

Assertion failed.

3   Fail
x=[-644 380 1009]; assert(isequal(altsum(x),-15))

a = -0.0031 0.0079 0.0040 y = 0.0088

Assertion failed.

4   Fail
x=[-20 -48 0 -318]; assert(isequal(altsum(x),346))

a = -0.1000 -0.0625 Inf -0.0157 y = Inf

Assertion failed.

5   Fail
x=[1095 -1874 428 896 731 578 40]; assert(isequal(altsum(x),2694))

a = 0.0018 -0.0016 0.0093 0.0056 0.0082 0.0121 0.2000 y = 0.2355

Assertion failed.

Suggested Problems

More from this Author10