title: c++ sin not return correct values
body: <p>I am trying to complete a program that converts degrees to radians and vice versa. After that, users can find sin, cosine, asin and acos. The program now keeps returning incorrect answers. I have looked through a few previous questions but none of them have helped. The incorrect answer is usually like sin(90)=.84654648</p>
  
  <pre><code>// File Name: program6.cpp
  // Author: Cameron Hall
  // Student ID: t997f229
  // Assignment Number: 6
  // Description: This program reads some text entered by the user, then in functions that return sine and cosin
  // Last Changed: October 15, 2015
  
  #include &lt;iostream&gt;
  #include &lt;cmath&gt;
  
  using namespace std;
  int degrees, radians;
  const double PI= 3.14159265359; //Declare PI
  double x;           // x for radians
  int y;              // for arc-sin and arc-cosinc
  // Returns x degrees converted to radians
  
  double degrees_to_radians(double y) {
      double radians= (x * PI)/180;
      return radians;
  }
  
  // Returns x radians converted to degrees
  
  double radians_to_degrees(double x) {
      degrees= (y * 180)/PI;
      return degrees;
  }
  
  int main(void) {
  cout.setf(ios::fixed);
  cout.setf(ios::showpoint);
  cout.precision(3);
  
  
  int choice;     // For input needed to plug into function 
  while (choice != -1) {
  cout &lt;&lt; "Trigonometric function calculator: " &lt;&lt; endl;
  cout &lt;&lt; "1. Sine" &lt;&lt; endl;
  cout &lt;&lt; "2. Cosine" &lt;&lt; endl;
  cout &lt;&lt; "3. Arc-sine" &lt;&lt; endl;
  cout &lt;&lt; "4. Arc-cosine" &lt;&lt; endl;
  cout &lt;&lt; "5. Quit" &lt;&lt; endl;
  cout &lt;&lt; "Enter the number of your choice from the menu: " &lt;&lt; endl;
  cin &gt;&gt; choice; 
  switch (choice) {
  
      case 1: cout &lt;&lt; "\n To find sin(x), enter a value for x: ";
          cin &gt;&gt; x;
          radians= degrees_to_radians(x);
          cout &lt;&lt; "sin(" &lt;&lt; x &lt;&lt; ") =" &lt;&lt; sin(radians) &lt;&lt; endl;       
          break;
          case 2: cout &lt;&lt; "\n To find cosine(x) where x is an angle in degrees, enter a value for x: " &lt;&lt; endl;
          cin &gt;&gt; x;
          radians= degrees_to_radians(x);
          cout &lt;&lt; "cosine(" &lt;&lt; x &lt;&lt; ") =" &lt;&lt; cos(radians) &lt;&lt; endl;
          break;
      case 3: cout &lt;&lt; "\n To find asin(y) where y is an angle in degrees, enter a value for y: " &lt;&lt; endl;
          cin &gt;&gt; y;
          degrees= radians_to_degrees(y);
          cout &lt;&lt; "asin(" &lt;&lt; y &lt;&lt; ") =" &lt;&lt; sin(radians) &lt;&lt; endl;
          break;
      case 4: cout &lt;&lt; "\n To find acos(y), enter a value for y: " &lt;&lt; endl;
          cin &gt;&gt; y;
          degrees= radians_to_degrees(y);
          cout &lt;&lt; "acos(" &lt;&lt; y &lt;&lt; ") =" &lt;&lt; acos(radians) &lt;&lt; endl;
          break;
      case 5: return (0);
  }
  }
  return 0;
  }
  </code></pre>