# Answer to Question #12117 in C# for Ian

Question #12117
The first few Fibonacci no. are 1,2,3,5,8.One place that these numbers occur is as certain population growth rates. If a population has no deaths,then the series shows the increase in population growth rates.If a population has no deaths,then the series shows the increase in population after each generation.A generation is the time it takes a member to reach reproducing age.The formula applies most straightforwardly to asexual reproduction at a rate of one offspring per parent per generation. In any event, the green crud population grows at that rate and produces one generation every five days. Hence, if a green crud population starts out as 10 pounds of crud, in 15 days there is 30 pounds, in 20 days there is 50 pounds, and so forth. Create a program that takes as input the initial size of a green crud population (in pounds)and a number of days and then outputs the number of pounds of green crud after that many days.Assume that the popultion size remain the same for four days and then increase on the 5th day
1
2012-07-20T11:49:05-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TEMP
{
class Program
{
& static void Main(string[] args)
& {
int n = 0;
int crud = 0;
Console.Write(&quot;Initial size(in pounds): &quot;);
Console.Write(&quot;Number of days: &quot;);
int previous = crud;
n -= 5;
while (n &gt;= 5)
{
int temp = crud;
crud = crud + previous;
previous = temp;
n -= 5;
}
Console.WriteLine(&quot;Population size is &quot; + crud.ToString() + &quot; pounds.&quot;);
& }
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!