Cody

Problem 45202. Check if number is a square number

Solution 2218046

Submitted on 18 Apr 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
assert(isequal(isSquare(1),true))

b = 0

Assertion failed.

2   Fail
assert(isequal(isSquare(4),true))

b = 0

Assertion failed.

3   Fail
assert(isequal(isSquare(9),true))

b = 0

Assertion failed.

4   Fail
assert(isequal(isSquare(49),true))

b = 0

Assertion failed.

5   Fail
assert(isequal(isSquare(64),true))

b = 0

Assertion failed.

6   Fail
assert(isequal(isSquare(15129),true))

b = 0

Assertion failed.

7   Fail
assert(isequal(isSquare(3),false))

b = 0.7321

Assertion failed.

8   Fail
assert(isequal(isSquare(199),false))

b = 0.1067

Assertion failed.