C Program to find area of Triangular Prism lateral surface
Program
#include<stdio.h>
void main()
{
int a, b, c;
int height;
int area;
printf("Enter side a:\t");
scanf("%d", &a);
printf("Enter side b:\t");
scanf("%d", &b);
printf("Enter side c:\t");
scanf("%d", &c);
printf("Enter the height:\t");
scanf("%d", &height);
area = (a + b + c) * height;
printf("The lateral area of the triangular prism is:\t%d\n", area);
}
Output
Enter side a: 4
Enter side b: 4
Enter side c: 6
Enter the height: 3
The lateral area of the triangular prism is: 42