Please note that zero is a valid number of days for the


The nth Fibonacci number Fn is defined as follows:F0 = 1, F1 = 1,andFn = Fn-1 + Fn-2 for n > 1In other words, each number is the sum of the two previous numbers in the sequence. Thus, thefirst several Fibonacci numbers are 1, 1, 2, 3, 5, and 8. Interestingly, certain population growthrates are characterized by the Fibonacci numbers. If a population has no deaths, then the seriesgives the size of the population after each time period.Assume that a population of green crud grows at a rate described by the Fibonacci numbers andhas a time period of 5 days. Hence, if a green crud population starts out as 10 pounds of crud,then after 5 days, there is still 10 pounds of crud; in 10 days, there is 20 pounds of crud; in 15days, 30 pounds of crud; in 20 days, 50 pounds of crud, and so on, i.e.,Write a program that takes both the initial size of a green crud population (in pounds) and somenumber of days as input from the keyboard, and computes from that information the size of thepopulation (in pounds) after the specified number of days. Assume that the population size is thesame for four days and then increases every fifth day. The program must allow the user to repeatthis calculation as long as desired. Please note that zero is a valid number of days for the crud togrow in which case it would remain at its initial value.You should make good use of functions to make your code easy to read. Please use at least one user-defined function (except of the clear_keyboard_buffer function) to write your program.

Solution Preview :

Prepared by a verified Expert
Business Economics: Please note that zero is a valid number of days for the
Reference No:- TGS01661689

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)