//Cameron Pham CS1A Chapter 3, P. 147, #20
//
/*******************************************************************************
*
* Calculate Trigonometric Values
* _____________________________________________________________________________
*
* This program asks the user to enter an angle in radians. Then, it calculates
* and displays the sine, cosine, and tangent of the angle. The results are
* displayed using fixed-point notation and rounded to four decimal places.
* _____________________________________________________________________________
*
* INPUT
* angle: Angle entered in radians
*
* OUTPUT
* sine: The sine of the angle
* cosine: The cosine of the angle
* tangent: The tangent of the angle
*
******************************************************************************/
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
// Declare the variable used to store the angle entered by the user.
double angle;
// Ask the user to enter an angle in radians.
cout << "Enter an angle in radians: ";
cin >> angle;
cout << endl;
// Display the results using fixed-point notation with four digits after the
// decimal point.
cout << fixed << setprecision(4);
// Calculate and display the sine, cosine, and tangent of the angle.
cout << "Sine: " << sin(angle) << endl;
cout << "Cosine: " << cos(angle) << endl;
cout << "Tangent: " << tan(angle) << endl;
return 0;
}