#include using namespace std; long d[100]; long fibonacci(int n) { if (n < 3) return 1; if (d[n] != 0) return d[n]; else d[n] = fibonacci(n - 1) + fibonacci(n - 2); return d[n]; } int main() { int n; cout << "Nhap n: "; cin >> n; cout << "Ket qua: " << fibonacci(n); return 0; }