A Program to Find the Area of a Parallelogram
In this example, we are giving a program to find the area of a parallelogram. The rule of finding the area of a parallelogram is: A = base * vertical_height.
Program to find the area of a parallelogram:
#include <stdio.h>
#include <stdlib.h>
int main() {
float b, h, area;
printf("Enter the value of base and height: ");
scanf("%f %f", &b, &h);
area = b * h;
printf("Area of parallelogram: %.2f", area);
return 0;
}
Output:
Enter the value of base and height: 3, 4 Area of parallelogram: 12.00