Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- unsigned long long a=1, b=0, c;
- cout<<"how many numbers do you want to print?";
- cin>>n;
- cout<<a<<"\t";
- for(int i = 1; i < n; ++i)
- {
- c=b;
- b=a;
- a=b+c;
- cout<<a<<"\t";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement