Here is source code of the C Program to Find the area of a right angled triangle.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 Trapezium
float a, b, h;
printf("Enter the value for two bases & height of the trapezium: \n");
scanf("%f%f%f", &a, &b, &h);
area = 0.5 * (a + b) * h ;
printf("Area of the trapezium is: %.3f", area);
Output: $ cc pgm25.c $ a.out Enter the value for two bases and height of the trapezium : 10 15 20 Area of the trapezium is: 250.000
Sanfoundry Global Education & Learning Series – 1000 C Programs.