title: How to generate Fibonacci series in C
body: <p>I want to generate Fibonacci series in C. My code is giving a compilation error. Here is the code, Actually I am a beginner in programming.</p>
  
  <pre><code>main()
  {
     int n, first = 0, second = 1, next, c;
  
     printf("Enter the number of terms\n");
     scanf("%d",&amp;n);
  
     printf("First %d terms of Fibonacci series are :-\n",n);
  
     for ( c = 0 ; c &lt; n ; c++ )
     {
        if ( c &lt;= 1 )
           next = c;
        else
        {
           next = first + second;
           first = second;
           second = next;
        }
        printf("%d\n",next);
     }
  }
  </code></pre>