Cody

# Problem 23. Finding Perfect Squares

Solution 3471788

Submitted on 29 Oct 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   Pass
a = [2 3 4]; assert(isequal(isItSquared(a),true))

c = 4 b = logical 1 c = 9 b = logical 1 c = 16 b = logical 1

2   Fail
a = [20:30]; assert(isequal(isItSquared(a),false))

c = 400 b = logical 1 c = 441 b = logical 1 c = 484 b = logical 1 c = 529 b = logical 1 c = 576 b = logical 1 c = 625 b = logical 1 c = 676 b = logical 1 c = 729 b = logical 1 c = 784 b = logical 1 c = 841 b = logical 1 c = 900 b = logical 1

Assertion failed.

3   Pass
a = [1]; assert(isequal(isItSquared(a),true))

c = 1 b = logical 1

4   Pass
a = [6 10 12 14 36 101]; assert(isequal(isItSquared(a),true))

c = 36 b = logical 1 c = 100 b = logical 1 c = 144 b = logical 1 c = 196 b = logical 1 c = 1296 b = logical 1 c = 10201 b = logical 1

5   Fail
a = [6 10 12 14 101]; assert(isequal(isItSquared(a),false))

c = 36 b = logical 1 c = 100 b = logical 1 c = 144 b = logical 1 c = 196 b = logical 1 c = 10201 b = logical 1

Assertion failed.

### Community Treasure Hunt

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

Start Hunting!