title: Recursion and fibonacci sequence
body: <p>How do I get this code to print all values of the fibonacci sequence of given terms? Right now it prints only the last term </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int fibonacci(int n){
  
      if (n==2)
          return 1; 
      else
        return fibonacci(n-1) + fibonacci(n-2);   
  
  }
  
  
  int main()
  {
  
      int n;
      int answer;
      printf("Enter the number of terms you'd like in the sequence\n");
      scanf("%d",&amp;n);
  
      answer = fibonacci(n);
      printf("The answer is %d\n", answer);
  
  }
  </code></pre>