#Include Using Namespace Void Int
#Include Using Namespace Void Int
cin>>n;
}}}
getch();
#include<iostream>
using namespace std;
else
{
move(n-1,A,B,C);
move(1,A,C,B);
move(n-1,B,C,A);
}}
int main( )
{
move(3,1,3,2);
cout<<"\n\t *************************************************\n";
return 0;}
#include <iostream>
using namespace std;
int fib(int n)
{
if(1 == n || 2 == n)
{
return 1;
}
else
{
return fib(n-1) + fib(n-2);
}}
int main()
{
int k;
cout<<"enter the number of terms";
cin>>k;
for(int i=1; i<=k; i++)
{
cout << fib(i) << endl;
}
return 0;
}
#include <iostream>
using namespace std;
void main()
{
int a,b,x,y,num1,ct;
a=0;
b=1;
cout << "Enter the number of terms : " << endl;
cin>>num1;
cout << a << endl;
cout << b << endl;
for(ct=1;ct<=num1-2;ct++)
{
x=a+b;
cout << x << endl;
y=a;
a=b;
b=x;
}}