C++ Program to find area of pentagon
Program
#include<iostream>
using namespace std;
int main()
{
int apothem, side;
float area, area_num;
cout << "Enter the apothem:\t";
cin >> apothem;
cout << "Enter the length of side:\t";
cin >> side;
area_num = (5 * side * apothem);
area = area_num / 2;
cout << "Area of pentagon: " << area << endl;
}
Output
Enter the apothem: 5
Enter the length of side: 13
Area of pentagon: 162.5