This C Program calculates the area of Parallelogram. The formula used in this program are Area = b * a where b is the length of any base, a is the corresponding altitude.
Here is source code of the C Program to Find the area of Parallelogram. The C program is successfully compiled and run on a Linux system. The program output is also shown below.
* C Program to Find Area of Parallelogram
float base, altitude;
printf("Enter base and altitude of the given Parallelogram: \n ");
scanf("%f%f", &base, &altitude);
area = base * altitude;
printf("Area of Parallelogram is: %.3f\n", area);
Output: $ cc pgm27.c $ a.out Enter base and altitude of the given Parallelogram: 17 19 Area of Parallelogram is: 323.000
Sanfoundry Global Education & Learning Series – 1000 C Programs.