Question
Consider the following code to find the nth fibonacci term:int fibo(int n)  if n == 0    return 0   else    prevFib = 0    curFib = 1    for i : 1 to n-1      nextFib = prevFib + curFib   __________   __________    return curFibComplete the above code.
Answer: Option C
Was this answer helpful ?
The lines, prevFib = curFib and curFib = nextFib, make the code complete.
Was this answer helpful ?
Submit Solution