Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

#include<iostream>

#include<iomanip>

using namespace std;

int main()

int b,i,j=0,k=1,sum=0;

cout<<"Enter number of turns";

cin>>b;

for(i=1;i<=b;i++)

if(i==1)

cout<<setw(12)<<j;

continue;

if(i==2)

cout<<setw(12)<<k;

continue;

sum=j+k;

j=k;

k=sum;

cout<<setw(12)<<sum;
}

return 0;

You might also like