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