Dsa
Math
Easy
Fibonacci Position Finder
Write a program that finds the position (1-based index) of the first Fibonacci number that is greater than or equal to a given integer K. The program should read K and print the position.
Input:
An integer K (1 <= K <= 10000).
Output:
The position of the first Fibonacci number >= K.
Example:
Input:
10
Output:
6
Key concepts
fibonaccipositionlooping
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now