Cody

# Problem 44273. Given a square and a circle, please decide whether the square covers more area.

Solution 1943822

Submitted on 20 Sep 2019 at 10:15
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
sq = 2; ci = 1; y_correct = (sq>ci); assert(isequal(sqci(sq,ci),y_correct))

s1 = 4 s2 = 0.7854 y = 3.2146

Assertion failed.

2   Fail
sq = rand; ci = rand; y_correct = (4*sq^2>pi*ci^2); assert(isequal(sqci(sq,ci),y_correct))

s1 = 2.8249e-04 s2 = 0.4898 y = -0.4895

Assertion failed.

3   Pass
sq = 0; ci = 0; y_correct = (0>0); assert(isequal(sqci(sq,ci),y_correct))

s1 = 0 s2 = 0 y = 0

4   Fail
sq = 100; ci = 4; y_correct = (7>3); assert(isequal(sqci(sq,ci),y_correct))

s1 = 10000 s2 = 12.5664 y = 9.9874e+03

Assertion failed.

5   Fail
sq = 21; ci = 127; y_correct = (3>7); assert(isequal(sqci(sq,ci),y_correct))

s1 = 441 s2 = 1.2668e+04 y = -1.2227e+04

Assertion failed.