The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Hi, I have a question about how to write a function that will add up the two numbers that are exactly prior to it. Thank you! I need to fix the one last problem because there is only 2 hours left before I can fix the bug. Thank you!
Â
COMP.1010 (202, 203)Program 2SP16 - Dr. LinDue date:03-26-2016 (Sat.), 11:59pmSubmission: C source file,program2.c, on BlackboardPoints:20 pointsDescription:The nthFibonacci numberFnis defined as follows:F0= 1,F1= 1,andFn=Fn-1+Fn-2forn > 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.Please plan ahead and don’t start the assignment in the last minuet before the due date.You need to start it as soon as possible so you’ll have plenty of time to study and ask questions.Technical difficulty (e.g., internet access) is NOT an excuse that you can’t submit the assignmenton time.If you can’t immediately figure out how to write the C code, please try the followingsteps:a.think about what your program will need to do (the overall goal);Days051015202530Crud (pounds)101020305080130
Attachments:
-----------