Cody

Problem 45333. Area-01

Solution 2685785

Submitted on 13 Jul 2020 by JessicaR
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 Author149

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!