/* compute sin(theta), theta is in degrees */ #include // required for using cin, cout #include // required for using math functions using namespace std; const double PI = acos(-1.0); int main( ) { double angle_deg, angle_rad, value; cout << "Enter the angle theta in degrees:"; cin >> angle_deg; // input the angle in degrees angle_rad = angle_deg * (PI/180); //change the angle in degrees to in radian value = sin(angle_rad); // compute sin(theta) cout << "sin(" << angle_deg << ")=" << value << endl; // output the result return 0; }