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:
The Tech Platform
Kommentare