Cody

Problem 45538. Find the area of ​​the square

Solution 2436687

Submitted on 31 May 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
a = 8; n = 5; y = 1600; assert(isequal(squartArea(n,a),y))

Assertion failed.

2   Pass
a = 0; n = 10; y = 0; assert(isequal(squartArea(n,a),y))

3   Pass
a = 100/pi; n = 6; y = 36476; tolerance = 1e-12; assert(abs(36476-y)<tolerance)

4   Pass
a = 15; n = 0; y = 0; assert(isequal(squartArea(n,a),y))

5   Fail
a = 10; n = 2; y = 400; assert(isequal(squartArea(n,a),y))

Assertion failed.