- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Program to find the Area of a Pentagon in C++

In this problem, we are given a number n that denotes that side of the pentagon. Our task is to create a program to find the Area of a Pentagon in C++.

Pentagon is a five-sided geometric figure.

**Regular pentagon** is a pentagon with all five sides and angles equal.

**Let’s take an example to understand the problem,**

## Input

a = 7

## Output

84.3

**Program to illustrate the working of our solution,**

## Example

#include <iostream> using namespace std; float calcpentagonArea(int a){ return ( ((6.8819)*a*a)/4); } int main() { int a = 7; cout<<"The area of regular pentagon of side "<<a<<" is"<<calcpentagonArea(a); return 0; }

## Output

The area of regular pentagon of side 7 is 84.3033

- Related Questions & Answers
- Diagonal of a Regular Pentagon in C++ Program
- Java program to find the area of a square
- Java program to find the area of a rectangle
- Java program to find the area of a triangle
- Java program to find the area of a circle
- Python Program to find the area of a circle
- Java Program to Find the Area of a Trapezium
- Java Program to Find the Area of a Parallelogram
- Program to find the Area of a Parallelogram in C++
- C Program for Program to find the area of a circle?
- Find the Area of a Circle in Java Program
- Program to find area of a polygon in Python
- Python Program to Find the Area of a Rectangle Using Classes
- Golang Program to Find the Area of a Rectangle Using Classes
- Program to find the Area and Perimeter of a Semicircle in C++

Advertisements