Stuck again. Determines the size of the green crud population on any given day.
// Assumes that green crud reproduces every 5 days starting when
// it is 10 days old,giving a growth rate following the Fibonacci sequence.
// So if there is a new crud population of 10 pounds on day 0, the
// crud population at increments of 5 days beginning with day 0 are as follows:
// 10, 10, 20, 30, 50, 80, 130, ...
// That is, on day 0 there are 10 pounds; on day 5 there are still 10 pounds;
// on day 10 there are 20 pounds; on day 15 there are 30 pounds; and so on.
// **************************************************************************
There are two basic loop tasks:(1) update the day, and (2) if it's a fifth day, update the amounts of crud. On the fifth day the old crud produces baby crud (you'll need a variable to store this); both the old crud and the new crud are now old crud; and the baby crud is new crud.
Even with all of these hints, I'm at a loss as to how to proceed. I am not sure to use a while or a for or a combo or what??
Thanks
RG