While loop in fibonacci series

why we use counter in while loop in fibonacci series?

@harsh.hj,

To get the desired output for every input, check that it is required to print the n+1th number for its respective input as the series is starting from 0. If it’s starting from 1,1,2… the loop will run for n times only