यहां हम देखेंगे कि एन-साइडेड रेगुलर पॉलीगॉन में अंकित वृत्त का क्षेत्रफल कैसे ज्ञात किया जाता है। N (भुजाओं की संख्या) दी गई है, और बहुभुज की प्रत्येक भुजा 'a' है

दृष्टिकोण सरल है। एक N भुजा वाले बहुभुज को N समान त्रिभुजों में विभाजित किया जा सकता है, केंद्र में प्रत्येक त्रिभुज का संपूर्ण कोण 360/N है, इसलिए -

उदाहरण
#include <iostream>
#include <cmath>
using namespace std;
float area(float n, float a) {
if (n < 0 || a < 0 ) //if the valuse are negative it is invalid
return -1;
float r = a/(2.0*tan((180/n) * 3.14159/180));
float area = 3.14159 * r*r;
return area;
}
int main() {
float n = 8, a = 4;
cout << "Area : " << area(n, a);
} आउटपुट
Area : 73.2422