
Patrick B. answered 04/13/21
Math and computer tutor/teacher
using namespace std;
#include <iostream>
#include <math.h>
#define PI (3.14159)
Go()
{
double adj=-1;
double angleRadians;
double angleDegrees=-1;
double hypot;
while (angleDegrees<=0)
{
cout << "Please input the measure of the angle in degrees :>";
cin >> angleDegrees;
}
while (adj<=0)
{
cout << "Please input the measure of the adjacent side :>";
cin >> adj;
}
angleRadians = angleDegrees/180*PI;
hypot = adj/cos(angleRadians);
cout << "The hypotenuse is " << hypot << endl;
}
int main()
{
Go();
}