Cody

Problem 45538. Find the area of ​​the square

Solution 2754259

Submitted on 29 Jul 2020 by Rafael Hernandez-Walls
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 = 8; n = 5; y = 1600; assert(isequal(squartArea(n,a),y))

ans = 1600

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

ans = 0

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))

ans = 0

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

ans = 400

Suggested Problems

More from this Author2