#include <iostream>
using namespace std;
class fibo
{
    int a,b,n,i,c;
    public:
    fibo()
    {
        a=-1;
        b=1;
    }
    void output()
    {
        cout<<"\nEnter a limit:"<<endl;
        cin>>n;
        for(i=0;i<n;i++)
        {
            c=a+b;
            cout<<c<<endl;
            a=b;
            b=c;
        }
    }
};
int main()
{
    cout<<"\nFIBONICC SERIES";
    cout<<"\n_______________";
    fibo f;
    f.output();
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: