Class Assignment

help me to solve this question
Give some hints.

hi @ritikbunty2511_729d0258992e0982 its just the fib no.
refer this

#include <bits/stdc++.h>
using namespace std;

long long int fib(long long int n)
{
    if (n <= 1)
        return n;

    return fib(n - 1) + fib(n - 2);
}

int main()
{
    int testCases;
    cin >> testCases;
    int k = 1;

    while (testCases--)
    {
        int n;
        cin >> n;
        cout << "#" << k++ << " : " << fib(n+2) << endl;
    }

    return 0;
}

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.