← Problem book: C
Lesson 93 of 96 · 10 XP
Fibonacci with recursion
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
Fibonacci numbers: F(0) = 0, F(1) = 1, and each next one is the sum of the two previous ones. Write a recursive function and print F(n) for the n you read (0 ≤ n ≤ 20).
Example
Input:
6
Output:
8
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.