Question: #include #include using namespace std; int main ( ) { double radians = 0 , degrees = 0 ; cin > > degrees; double PI

#include
#include
using namespace std;
int main(){
double radians =0, degrees =0;
cin >> degrees;
double PI = acos(-1);
radians = degrees *(PI /180);
double cosvalue = cos(radians);
double sinvalue = sin(radians);
double tanvalue = tan(radians);
cout << "The cosine of "<< radians <<" radians, "<< degrees <<" degrees, is approximately "<< cosvalue <<"
";
cout << "The sine of "<< radians <<" radians, "<< degrees <<" degrees, is approximately "<< sinvalue <<"
";
cout << "The tangent of "<< radians <<" radians, "<< degrees <<" degrees, is approximately "<< tanvalue <<"
";
}
Create a C++ program that finds the cosine, sine and tangent of an angle entered by the user in degrees. Be sure you prompt the user for the angle including the required units. The program will need to convert the input angle to radians. Display the angle in both degrees and radians along with the calculated cosine, sine, and tangent.
All variables and constants used should be of type double.
Use the fact that PI = arcosine(-1) to define a named constant called PI.
Use the fact that there are PI /180 radians per degree to do the conversion from degrees to radians.
Make sure you end your output with the endl or "
" new line character.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!