title: Euler Method recursive
body: <p>I am quite new to coding in C.
  I am trying to apply Eulers Method for an first order ODE in a quite simple way, both as an iterative as well as an recursive function. I can't put the recursive implementation together.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  float a,b,x,y,h,b;
  
  float fun(float x,float y)
  {
      float f;
      f=x+y;
      return f;
  }
  
  float euler (float x, float y, float h, float t){
      float k;
      while(x&lt;=b) {
          y=y+h*fun(x,y);;
          x=x+h;
          printf("%0.3f\t%0.3f\n",x,y);
          }
      };
  
  float euler_rec (float x, float y, float h, float b){
      if (x&lt;=b) {
          y=euler_rec(x, y, h, b)+h*fun(x,y);
          }
      else {
          printf("%0.3f\t%0.3f\n",x,y);
          }
      };
  
  int main()
  {
  
      printf("\nEnter x0,y0,h,xn: ");
      scanf("%f%f%f%f",&amp;x,&amp;y,&amp;h,&amp;b);
  
      printf("\n  x\t  y\n");
  
      euler(x, y, h, b);
  
  printf ("rec\n");
      euler_rec(x, y, h, b);
  
  
  return 0;
  }
  </code></pre>