Create a program that computes the Tribonacci sequence numbers Unlike the traditional Fibonacci sequence (a number is
Fantastic news! We've Found the answer you've been seeking!
Question:
Create a program that computes the "Tribonacci" sequence numbers ○Unlike the traditional Fibonacci sequence (a number is the sum of the two previous ones), here a number is the sum of the three previous ones (the initial numbers are 1,1,1) The first 9 elements of the sequence are: 1, 1, 1, 3, 5, 9, 17, 31, 57, ... Your program should asks the user a positive Integer n and the deliver the n-th element of the Tribonacci sequence For example, for n = 6, it delivers 9
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date: