Connect with one of the following accounts


Please wait while we redirect...

Views: 161   

In this tutorial i will show you how to calculate parallelogram area.
This program gets parallelogram base and height from user and calculates area and prints it using following formula
Area = base X height

#include <iostream>
#include <math.h>

int main() {
    float parallelogramBase;
    float parallelogramHeight;

    std::cout << "Please enter base of parallelogram:";
    std::cin >> parallelogramBase;

    std::cout << "Please enter height of parallelogram:";
    std::cin >> parallelogramHeight;

    float areaOfParallelogram = parallelogramBase * parallelogramHeight;

    std::cout << "Area of parallelogram is: " << areaOfParallelogram;


Please enter base of parallelogram: 22
Please enter height of parallelogram: 18
Area of parallelogram is: 396

On By

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News