//Micah Krosby CS1A Ch. 3, P. 147, # 20
/*******************************************************************************
*
* CALCULATE TRIGONOMETRIC IDENTITIES OF AN ANGLE
* _____________________________________________________________________________
*
* This program finds the sine, cosine and tangent of an angle in radians.
*
* FORMULAE-
* sine = sin(angle)
* cosine = cos(angle)
* tangent = tan(angle)
* _____________________________________________________________________________
*
* INPUT-
* radians : Angle in radians
*
* OUTPUTS-
* sine : Sine of angle
* cosine : Cosine of angle
* tangent : Tangent of angle
*
*******************************************************************************/
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main() {
float radians; //INPUT- Angle in radians
float sine; //OUTPUT- Sine of angle
float cosine; //OUTPUT- Cosine of angle
float tangent; //OUTPUT- Tangent of angle
//Initialize input variable
cout << "Enter angle in radians" << endl;
cin >> radians;
//Calculate output variables
sine = sin(radians);
cosine = cos(radians);
tangent = tan(radians);
//Formatted output
cout << "Sine is " << fixed << setprecision(4) << sine << endl;
cout << "Cosine is " << fixed << setprecision(4) << cosine << endl;
cout << "Tangent is " << fixed << setprecision(4) << tangent << endl;
return 0;
}