Untitled
unknown
plain_text
2 years ago
258 B
9
Indexable
#include <iostream>
using namespace std;
int main()
{
int n,i,s;
cout<<"Enter number of elements required";
cin>>n;
int a=0,b=1;
for(i=1;i<n;i++)
{
s=a+b;
a=b;
b=s;
cout<<s<<"\n";
}
return 0;
}
Editor is loading...
Leave a Comment