Cody

Solution 2130794

Submitted on 17 Feb 2020 by David Hill
  • Size: 12
  • This is the leading solution.
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
r = 1; y_correct = 0.8584; assert(abs(inscribed_circle(r)-y_correct)<0.01)

2   Pass
r = 5; y_correct = 21.4602; assert(abs(inscribed_circle(r)-y_correct)<0.01)

3   Pass
r = 0; y_correct = 0; assert(isequal(inscribed_circle(r),y_correct))

4   Pass
r = 12.1; y_correct = 125.6794; assert(abs(inscribed_circle(r)-y_correct)<0.01)

Suggested Problems

More from this Author111