#include <stdio.h>
int main()
{
int n, u0 = 0, u1 = 1, next, i;
printf("Enter the number of terms: ");
scanf("%d", &n);
printf("First %d terms of the Fibonacci series: \n", n);
for (i = 0; i < n; ++i)
{
if (i <= 1)
next = i;
else
{
next = u0 + u1;
u0 = u1;
u1 = next;
}
printf("%d, ", next);
}
return 0;
}