~cpp #include <iostream> using namespace std; int f(int, int, int); int main() { int n; cout << "몇번째 수? : "; cin >> n; if (n == 1) cout << 1; else cout << f(1, 1, n-1); cout << endl; return 0; } int f(int a, int b, int n) { if (n == 1) return a + b; else return f(b, a+b, n-1); }