C Language program to calculate parallelogram area
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 <stdio.h>
int main(void) {
float parallelogramBase;
float parallelogramHeight;
printf("Please enter base of parallelogram:");
scanf("%f", ¶llelogramBase);
printf("Please enter height of parallelogram:");
scanf("%f", ¶llelogramHeight);
float areaOfParallelogram = parallelogramBase * parallelogramHeight;
printf("Area of parallelogram is: %f", areaOfParallelogram);
}
Output:
Please enter base of parallelogram: 11
Please enter height of parallelogram: 13
Area of parallelogram is: 143.000000