Skip to content
CampusEduX

Fibonacci Number

Easyjavapythonccppjavascript

Find the N-th Fibonacci number. The sequence starts 0, 1, 1, 2, 3, 5, ... (0-indexed: F(0) = 0, F(1) = 1).

Input Format

A single line containing the integer N.

Output Format

Print F(N).

Related Problems

  • Factorial Using Recursion
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Power Using Recursion
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Generate All Subsets
    Medium · java, python, c, cpp, javascript
    Solve Problem

Input (stdin)

Output

Run your code to see output here...