Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- void main()
- {
- int a;
- int b = 1, c = 1;
- int sum = 0;
- cout << "broj " << endl;
- cin >> a;
- cout << sum << endl;
- cout << b<<endl;
- cout << c<<endl;
- for (int i = 3; i <= a; i++)
- {
- sum = b + c;
- cout << sum << endl;
- b =c;
- c = sum;
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement