Cody

# Problem 44035. determine the sum of the squares

Solution 2942041

Submitted on 13 Sep 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 = 4; y = 30; assert(isequal(sum_square(x),y))

Unrecognized function or variable 'n'. Error in sum_square (line 2) sum((1:n).^2); Error in Test1 (line 3) assert(isequal(sum_square(x),y))

2   Fail
x = 6; y = 91; assert(isequal(sum_square(x),y))

Unrecognized function or variable 'n'. Error in sum_square (line 2) sum((1:n).^2); Error in Test2 (line 3) assert(isequal(sum_square(x),y))

3   Fail
x = 5; y = 55; assert(isequal(sum_square(x),y))

Unrecognized function or variable 'n'. Error in sum_square (line 2) sum((1:n).^2); Error in Test3 (line 3) assert(isequal(sum_square(x),y))

4   Fail
x = 15; y = 1240; assert(isequal(sum_square(x),y))

Unrecognized function or variable 'n'. Error in sum_square (line 2) sum((1:n).^2); Error in Test4 (line 3) assert(isequal(sum_square(x),y))

### Community Treasure Hunt

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

Start Hunting!