area of triangle with 2 sides and angle 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: how to find a point on a triangle with only sides
known sides AB, BC, AC
known points A(x, y), B(x, y)
unknown points C(x, y)
AC² - BC² = ((Ax - Cx)² + (Ay - Cy)²) - ((Bx - Cx)² + (By - Cy)²)
Goal:
C.x = ?
C.y = ?