Cody

Problem 45178. An n-sided regular polygon is drawn within a circle whose radius is 'r', what will be the area of the polygon?

Solution 1983425

Submitted on 20 Oct 2019 by William
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
n= 6; r=6; y_correct = 0.5*r^2*n*sind(360/n); assert(isequal( poly(n,r) , y_correct));

2   Pass
n= 8; r=6; y_correct = 0.5*r^2*n*sind(360/n); assert(isequal( poly(n,r) , y_correct));