Search across blog, articles, projects, courses, and community posts
The Fibonacci sequence starts 0, 1, 1, 2, 3, 5, 8, ...: each number is the sum of the previous two. Read n and print the nth Fibonacci number, counting from F(0) = 0 and F(1) = 1.
Input: one integer n.
Output: F(n).
0 <= n <= 50
10
55
1
1