Search⌘ K

Challenge 3: Find nth Fibonacci Number

Explore how to write a recursive Rust function that computes the nth Fibonacci term. This lesson helps you understand recursion and function use by solving a classic programming challenge, strengthening your grasp of Rust's function capabilities.

Problem Statement #

In this exercise, you have to write a recursive function fibonacci that takes a positive integer number n as a parameter and returns the nth Fibonacci term in that range. ...