area of right triangle formula code example
Example 1: area of a right angle triangle
#include <stdio.h>
int main(){
float h, b, A;
printf("What is the Height and base of the triangle: \n");
scanf("%f %f", &h, &b);
A = 0.5 * b *h;
printf("Area is %f\n", A);
}
Example 2: triangle area formula
double traingleArea = base * height / 2;
Example 3: what is the formula to find the area of a triangle
A=hbb
2=5·5
2=12.5