Code:
#include<stdio.h>
int main()
{
int h, b;
float area;
printf("\nEnter the height of the Triangle: ");
scanf("%d", &h);
printf("\nEnter the base of the Triangle: ");
scanf("%d", &b);
area = (h*b)/(float)2;
printf("\n\n\nThe area of the triangle is: %f", area);
return 0;
}
Output:
![](https://static.wixstatic.com/media/0f65e1_18e042961329455ea7709a4f994f9b9b~mv2.png/v1/fill/w_77,h_22,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/0f65e1_18e042961329455ea7709a4f994f9b9b~mv2.png)
The Tech Platform