Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int n, c, i = 0, p = 1, w;
- int a[1000];
- for ( c = 0 ; c < 50; c++ )
- {
- if ( c <= 1 )
- w = c;
- else
- {
- w = i + p;
- i = p;
- p = w;
- }
- a[c]=w;
- }
- int o;
- cin>>o;
- for(int x=o;x<50;x++)
- {
- cout<<a[x];
- break;
- }
- system("pause");
- }
Add Comment
Please, Sign In to add comment