title: Cube root using Herons method
body: <p>I am trying to implement a cube root after Herons method.</p>
  
  <p>Square root is working fine , but I am strugling with cubes root. </p>
  
  <p>My formula for cubes root is: x[i+1]= (3*x[i] + N/x[i]*x[i])/4 </p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;sstream&gt;
  
  using namespace std;
  
  double Heron(int Nummer)
  
  {
      double x = Nummer/2;
  
      for(int NumAppr = 0;NumAppr&lt;100;NumAppr++)
          {
              x = (3*x+Nummer/x*x)/4;
  
          }
      //double y = x/3;
      cout &lt;&lt; "root is: " &lt;&lt; x &lt;&lt; endl;
      return x;
  }
  
  int main()
  {
      Heron(27);
      system("PAUSE");
      return EXIT_SUCCESS;
  }
  </code></pre>