Write a java program that uses recursion to determine the


You need help in JAVA figuring out how to match my inputed hour value with an array of set values. You can make everything work from there. Here is the problem You are looking at, and below that is my code thus far. Any pointers or suggestions would be greatly appreciated.

Problem

You think rabbits breed quickly? Tribbles are worse by far! Dr. McCoy of the Enterprise is trying to determine how many tribbles are there going to be every hour. Now, he suspects that they are born pregnant with one baby-tribble (which saves a lot of time when you think about it) that is born within the first hour. His empirical research has identified these amount of tribbles alive at each hour:

2          2          2          6          10        18        34        62        114      210

Using this sequence, write a JAVA program that uses recursion to determine the number of tribble for any hour. It should prompt the user for the hour and then display the total tribbles.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a java program that uses recursion to determine the
Reference No:- TGS02869593

Expected delivery within 24 Hours