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 1996166

Submitted on 30 Oct 2019 by Gergely Patay
  • Size: 17
  • 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
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));

Suggested Problems

More from this Author148