C Program to find the area of a pentagon
Program
#include<stdio.h>
void main()
{
int apothem, side;
float area, area_num;
printf("Enter the apothem:\t");
scanf("%d", &apothem);
printf("Enter the length of side:\t");
scanf("%d", &side);
area_num = (5 * side * apothem);
area = area_num / 2;
printf("Area of pentagon: %f\n", area);
}
Output
Enter the apothem: 3
Enter the length of side: 5
Area of pentagon: 37.500000