Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- unsigned input;
- int i;
- int c;
- int A = 1;
- int b;
- int fb(int a)
- {
- cout << "0. ";
- cout << "0" << endl;
- cout << "2. "
- cout << "1";
- for (i=2;i<a;i++)
- {
- c = A+b;
- b = A;
- A = c;
- cout << i << ". " << c << endl;
- }
- }
- int main()
- {
- cout << "podaj ile wyrazow ciagu chcesz wyswietlic: ";
- cin >> input;
- fb(input);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement