Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
295 B
0
Indexable
Never
#include <iostream>
#include <fstream>
using namespace std;
int fib(int n) {
	int f;
	if (n == 0) return 0;
	if (n == 1) return 1;
	return fib(n - 1) + fib(n - 2);

}
int main()
{
	setlocale(LC_ALL, "Russian");
	ifstream in("input.txt");
	int n;
	in >> n;
	cout << fib(n);
}