Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!
"?nter a triangle and calculate the sine of its maximal angle. The triangle is defined by the coordinates of its vertices. The coordinates are floating-point numbers."
The truth is that I am falling behind class and I can't type the code... trying to get back on track, but I don't have enough time to solve this issue by myself.
We won't do your homework for you.
Though think back to trig.
sin(θ) = opposite / hypotenuse
So you coordinates are floating point numbers. That all well and good.
You need to define your three sides.
Coordinate1 = A
Coordinate2 = B
Coordinate3 = C
The distance between these points will be the length of that side.
Remember your distance formula is sqrt((x_2-x_1)^2+(y_2-y_1)^2)
Once you define you sides, you can find the angle by taking the inverse sin.