title: Confusing result while converting degree into radian in C
body: <pre><code>  int x;
    scanf("%d",&amp;x);
    x=(double)((x*3.14)/180);
    printf("%.6lf",x);
  </code></pre>
  
  <p>When I  run the above code and input x=60, I get -0.000000. </p>
  
  <pre><code>  int x;
    double a;
    scanf("%d",&amp;x);
    a=(x*3.14)/180;
    printf("%.6lf",a);
  </code></pre>
  
  <p>But when I  run this above code, I get the correct answer. </p>
  
  <p>I want to know where I am doing wrong. Is there problem in my type casting or use of double or any other thing? Any help will be appreciated. Thanks! </p>
  
  <p>N.B. : I need to print output upto 6 digits after decimal.</p>