title: Why is the output different from what I expected for a degree to radian conversion?
body: <p>I'll start off with the code.</p>
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  //Set Default Precision
  int precision = 10;
  
  int pi = 3.14159265358979323846264338327950288419716;
  int angle, degOrRad;
  int angleP;
  
  //Menu
  int menu()
  {
      cout &lt;&lt; endl;
      cout &lt;&lt; &quot;--- Trigonometry Calculator ---&quot; &lt;&lt; endl;
      cout &lt;&lt; &quot;Please enter the value of your desired angle =&gt; &quot;;
      cin &gt;&gt; angle;
      cout &lt;&lt; endl;
      cout &lt;&lt; &quot;Is the angle in degree or in radian?&quot; &lt;&lt; endl;
      cout &lt;&lt; &quot;Input D if it is in degree,&quot; &lt;&lt; endl;
      cout &lt;&lt; &quot;Input R if it is in radian. =&gt; &quot;;
      cin &gt;&gt; degOrRad;
      return angle, degOrRad;
  }
  
  int main()
  {
      menu();
  
      if (degOrRad == 'D')
          angleP = angle;
          angle = (angle*180)/pi;
          cout &lt;&lt;  angleP &lt;&lt; &quot; degrees = &quot; &lt;&lt; angle &lt;&lt; &quot; Radian&quot;;
  }
  </code></pre>
  <p>I am trying to get the user to input the angle and tell me if it is a degree or a radian, and if it is a degree the program will have it converted into radian.</p>
  <p>However when I ran the program, inputting 20 as the angle and then choosing degree outputs &quot;0 degrees = 1200 radian&quot;.</p>
  <p>Any idea where I went wrong?</p>
  <p>Thanks in advance.</p>