Question 1 of 4

Fibonacci

Recursion

Print the `n`th Fibonacci number using recursion (F(0)=0, F(1)=1).

Example 1:

Input: n = 7

Output: 13

Explanation: F(7) = 13.

Example 2:

Input: n = 0

Output: 0

Example 3:

Input: n = 1

Output: 1

Code

Testcase / Output

Default testcase

n = 7

Expected output

13

Returned results

Click Run to execute your code against the testcase.