Cody

Solution 1818660

Submitted on 17 May 2019
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 = 35431; y_correct = 256; assert(isequal(sq_sum(x),y_correct))

s = '35431' y = 0

Undefined function or variable 'tf'. Error in sq_sum (line 6) n=str2num(s(i),tf); Error in Test1 (line 3) assert(isequal(sq_sum(x),y_correct))

2   Fail
x = -431; y_correct = 64; assert(isequal(sq_sum(x),y_correct))

s = '-431' y = 0

Undefined function or variable 'tf'. Error in sq_sum (line 6) n=str2num(s(i),tf); Error in Test2 (line 3) assert(isequal(sq_sum(x),y_correct))