radian convert to sine, cos, tan..

i've written 1 program until this.. but im stucked at convert to sin, cos and tan parts.. can anyone help me to solve this problem ? i have to combine both of this coding...

# include <iostream>
# include <math.h>
using namespace std;

double cosin_value( double x);
double sin_value( double x);
double x;
double value;
double degree;
const double PI = 3.14159;
char choice;

int main()
{
cout << "******** Trigonometric Program ********" << endl;
cout << "Please enter an angle value => ";
cin >> value;
cout << "Is the angle in Degree or Radian?" << endl;
cout << "\t" << "Type D if it is in Degree" << endl;
cout << "\t" << "Type R if it is in Radian" << endl;
cout << "Your response => ";
cin >> choice;

if (choice == 'D' || choice == 'd')
{
degree = (value*PI)/180;
}


return 0;
}

//this code related to cos sin tan

{
cin >> radian;
if (radian >= 0 && radian <= 2*PI)
sin1 = sin(radian);
cos1 = cos(radian);
tan1 = tan(radian);

cout << " RESULTS" << endl;
cout << "======================" << endl;
cout << " x = " << radian << endl;
cout << " sin " << sin1 << endl;
cout << " cos " << cos1 << endl;
cout << " tan " << tan1 << endl;
cout << "======================" << endl;
}
Topic archived. No new replies allowed.