#include<iostream.h>
#include<conio.h>
class vinit
{
long n,term1,term2,term3;
public:
void fib()
{
term1=0; term2=1;
cout<<"Enter number of term ";
cin>>n;
for(long i=1;i<=n;i++)
{
cout<<term1<<ends;
term3=term1+term2;
term1=term2;
term2=term3;
}
}
};
void main()
{
clrscr();
vinit obj;
obj.fib();
getch();
}