- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 Parallelogram in C++
In this problem, we are given two values that denote the base and height of a parallelogram. Our task is to create a Program to find the Area of a Parallelogram in C++.
Parallelogram is a four side closed figure that has opposite sides equal and parallel to each other.
Let’s take an example to understand the problem,
Input
B = 20, H = 15
Output
300
Explanation
Area of parallelogram = B * H = 20 * 15 = 300
Solution Approach
To solve the problem, we will use the geometrical formula for area of parallelogram,
Area = base * height.
Program to illustrate the working of our solution,
Example
#include <iostream> using namespace std; float calcParallelogramArea(float B, float H){ return (B * H); } int main() { float B = 20, H = 15; cout<<"The area of parallelogram with base "<<B<<" and height "<<H<<" is "<<calcParallelogramArea(B, H); return 0; }
Output
The area of parallelogram with base 20 and height 15 is 300
- Related Articles
- Swift Program to Find the Area of a Parallelogram
- Java Program to Find the Area of a Parallelogram
- Kotlin Program to Find the Area of a parallelogram
- How To Find The Area of a Parallelogram in Golang?
- Area of a triangle inside a parallelogram in C++
- Program to find the Area of a Pentagon in C++
- C Program for Program to find the area of a circle?
- Find the area and perimeter of the parallelogram: "
- Program to find area of a Circular Segment in C++
- C++ Perimeter and Area of Varignon’s Parallelogram
- Program to find the Area and Perimeter of a Semicircle in C++
- Program to find the Area of an Ellipse in C++
- C Program for Circumference of a Parallelogram
- Program to find the Area and Volume of Icosahedron in C++
- C++ program to find the Area of the Largest Triangle inscribed in a Hexagon?

Advertisements