//Ryan Shahriyarpour CS1A Carl Argila CH3 HW Q:20
//
/*****************************************************************************
*
* Angle Calculator Program
*
*
* ***************
*
* The goal of the program is to calculate sine, cosine, and tangent of an angle in radians
*
*
* ******************
*
*
* INPUT
* angle : Angle in radians
*
* OUTPUT
* sine : Sine of the angle
* cosine : Cosine of the angle
* tangent : Tangent of the angle
*
****************************************************************************/
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main() {
double angle;
double sine;
double cosine;
double tangent;
cout << "Enter an angle in radians: ";
// Store angle value
cin >> angle;
// Calculate sine of angle
sine = sin(angle);
// Calculate cosine of angle
cosine = cos(angle);
// Calculate tangent of angle
tangent = tan(angle);
// Display result to proper decimal
cout << fixed << setprecision(4);
cout << "Sine: " << sine << endl;
cout << "Cosine: " << cosine << endl;
cout << "Tangent: " << tangent << endl;
return 0;
}
Ly9SeWFuIFNoYWhyaXlhcnBvdXIgICAgIENTMUEgQ2FybCBBcmdpbGEgQ0gzIEhXIFE6MjAKLy8KLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqIAogKiBBbmdsZSBDYWxjdWxhdG9yIFByb2dyYW0KICoKICogCiAqICoqKioqKioqKioqKioqKgogKiAKICogVGhlIGdvYWwgb2YgdGhlIHByb2dyYW0gaXMgdG8gY2FsY3VsYXRlIHNpbmUsIGNvc2luZSwgYW5kIHRhbmdlbnQgb2YgYW4gYW5nbGUgaW4gcmFkaWFucwogKiAKICogCiAqICoqKioqKioqKioqKioqKioqKgogKiAKICogCiAqIElOUFVUCiAqICBhbmdsZSA6IEFuZ2xlIGluIHJhZGlhbnMKICogCiAqIE9VVFBVVCAgICAKICogIHNpbmUgOiBTaW5lIG9mIHRoZSBhbmdsZQogKiAgY29zaW5lIDogQ29zaW5lIG9mIHRoZSBhbmdsZQogKiAgdGFuZ2VudCA6IFRhbmdlbnQgb2YgdGhlIGFuZ2xlCiAqIAogKio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