title: Pi approximation with Archimedes equation
body: <p>I ve to create a pi approximation based on Archimedes equation. I ve to do so with for mode and recursive mode. In for mode i ve create sth like the above:</p>
  
  <pre><code>  double Pi_approximation(double r, double L){
  
     int i;
     double fin;
     double y;
  
     for(i=1; i&lt;4; i++){
  
             y =sqrt(2*((r*r) - r*(sqrt(4*((r*r) - (L)))))); 
  
             L = y;
             printf("%f \n", L);
     }
  
     return y;
  }
  </code></pre>
  
  <p>My problem is in second loop of for. In the first y is calculated normally but in second loop when i print y and L, it prints me their pointer!! Any idea?</p>