How do i calculate angles in a right angle triangle in C++

So for a project in C++ class, we have to make a program that you input the lengths of side x and side y, then the program calculates the hypotenuse and both angles. So i have set up the program so that you enter both sides and it calculates the hypotenuse, but im not sure how to get the angles. I know you have to use inverse sin etc. But im not sure how to do inverse sin in C++ and i have also forgotten a ton of math during the years since highschool so i have no idea how to set up the math for the angle calculations. I know its something like Sin(angleA) = opposite/adjacent or something like that. Could someone please tell me how to do inverse sin in C++? Any help would be Greatly appreciated
thanks in advance
Last edited on
Better refresh some trigonometry, then you can apply those calculation directly using C++.

C++ does not support angle calculations directly, you will need to calculate using the sine(), cos() and tan().. functions.
Topic archived. No new replies allowed.