Cody

Problem 23. Finding Perfect Squares

Solution 2642575

Submitted on 2 Jul 2020 by Nayuan Lian
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))

value = 4 value = 9 value = 16

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

value = 400 value = 441 value = 484 value = 529 value = 576 value = 625 value = 676 value = 729 value = 784 value = 841 value = 900

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

value = 1

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

value = 36 value = 100 value = 144 value = 196 value = 1296 value = 10201

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

value = 36 value = 100 value = 144 value = 196 value = 10201

Suggested Problems

More from this Author95

Community Treasure Hunt

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

Start Hunting!