Fibonacci Series

in Hindi - Fibonacci Series



not yet

Source Code :

RUN#include<iostream>
#include <stdio.h>
using namespace std;

int main()
{
int n, i, first = 0, second = 1, next;

cout << "Enter the number of terms" << endl;
cin >> n;

cout << "Fibonacci series are " << endl;
for (i = 0 ; i < n ; i++)
{
if (i <= 1)
next = i;
else
{
next = first + second;
first = second;
second = next;
}
cout <<next<<endl;
}
return 0;
}