THE EXERCISE OF THE GUYS GUYS HAS BEEN MOVED TO THE MENU "EXERCISE OF Teacher"

Nth Fibonacci number

Threads: Write a program that counts the n th Fibonacci sequence known sequence f(n) = f(n-1) + f(n-2), n > 2 and f(1) = 1, f(2) = 1.
Input: A positive integer n single (0 < n <= 50).
Output: A single integer f(n).
For example:

input:
3
output:
2

You are not logged in? Log in to Submit Now!

37 Comments

Add a Comment