Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication3.cpp: определяет точку входа для консольного приложения.
- //
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- int i, n, a, b, c;
- i = 0;
- a = 0;
- b = 1;
- c = 0;
- cin >> n;
- do
- {
- c = a + b;
- b = a;
- a = c;
- cout << c;
- cout << endl;
- i++;
- } while (i < n);
- cout << endl;
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment