(Solution) 1010 (202, 203) Program 2 SP16 - Dr. Lin Due Date: 03-26-2016 (Sat.), 11:59pm Submission: C Source File, Program2.c, On Blackboard Points: 20 Points... | Snapessays.com


(Solution) 1010 (202, 203) Program 2 SP16 - Dr. Lin Due date: 03-26-2016 (Sat.), 11:59pm Submission: C source file, program2.c, on Blackboard Points: 20 points...


I want code for this question . the question is about fibonacci number.COMP.1010 (202, 203)

 

Program 2

 

SP16 - Dr. Lin

 

Due date:

 

03-26-2016 (Sat.), 11:59pm

 

Submission

 

: C source file,

 

program2.c

 

, on Blackboard

 

Points:

 

20 points

 

Description:

 

The n

 

th

 

Fibonacci number

 

F

 

n

 

is defined as follows:

 

F

 

= 1,

 

F

 

1

 

= 1,

 

and

 

F

 

n

 

=

 

F

 

n-1

 

+

 

F

 

n-2

 

for

 

n > 1

 

In other words, each number is the sum of the two previous numbers in the sequence.

 

Thus, the

 

first several Fibonacci numbers are 1, 1, 2, 3, 5, and 8.

 

Interestingly, certain population growth

 

rates are characterized by the Fibonacci numbers.

 

If a population has no deaths, then the series

 

gives 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 and

 

has 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 15

 

days, 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 some

 

number of days as input from the keyboard, and computes from that information the size of the

 

population (in pounds) after the specified number of days.

 

Assume that the population size is the

 

same for four days and then increases every fifth day.

 

The program must allow the user to repeat

 

this calculation as long as desired.

 

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

 

grow 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 assignment

 

on time.

 

If you can’t immediately figure out how to write the C code, please try the following

 

steps:

 

a.

 

think about what your program will need to do (the overall goal);

 

Days

 

5

 

10

 

15

 

20

 

25

 

30

 

Crud (pounds)

 

10

 

10

 

20

 

30

 

50

 

80

 

130

 


Solution details:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: May 23, 2022

Solution~00021147601749.zip (25.37 KB)


This attachment is locked

Our expert Writers have done this assignment before, you can reorder for a fresh, original and plagiarism-free copy and it will be redone much faster (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

May 23, 2022

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • ■ As a reference for in-depth understanding of the subject.
  • ■ As a source of ideas / reasoning for your own research (if properly referenced)
  • ■ For editing and paraphrasing.

This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

Get Free Price Quote