This article shows how to write a C Program to find the Area Of a Triangle using base and height with an example?. The mathematical formula to calculate the Area of a triangle using base and height is: Area = (base * height) / 2
This program allows the user to enter the base and height of a triangle, and then find the area of a triangle using those two values.
#include<stdio.h>
int main()
{
float base, height, area;
printf("\n Please Enter the Base of a Triangle : ");
scanf("%f", &base);
printf("\n Please Enter the Height of a Triangle : ");
scanf("%f", &height);
area = (base * height) / 2;
printf("\n The Area of a Triangle using Base and Height = %.2f\n", area);
return 0;
}