Answer:
#include <iostream>
#include <math.h>
using namespace std;
int main() {
double n;
cout << "Enter the number of sides: ";
cin >> n;
double s;
cout << "Enter the side: ";
cin >> s;
double area = n * s * s /(4.0 * tan(3.14159265 / n));
cout << "The area of the polygon is " << area;
}