Nth Fibonacci Iterative Problem

Nth Fibonacci Iterative Problem — ExecCode School DSA Practice

Solve the Nth Fibonacci Iterative problem on ExecCode. Free online school DSA practice in Numbers & Math Logic. Write and run code in Java, C++, Python — no signup required to run.

Problem description

You are given a whole number N. Your task is to solve Nth Fibonacci Iterative. Find the N-th Fibonacci number using a simple loop and print it.

Examples

Input 0; Output 0. Input 5; Output 5

Constraints

0<=N<=50

Practice Nth Fibonacci Iterative free on ExecCode. Browse DSA problems, topic map, and placement guides.