Create a program that asks the user for the number of a


The Fibonacci numbers provide a simple model for how couples of rabbits multiply. We start with a couple (female and male) of baby rabbits, that is, F[0]=1. It is assumed that baby rabbits mature within one month and after another month they have two babies, a new couple of rabbits. After one month there is still one couple, that is, F[1]=1. After two months there are two couples of rabbits, F[2]=2. After three months, the original couple will have another couple of babies, F[3]=3. In general, the sequence goes

F[n] = F[n-1]+F[n-2]

for the n-th month.

Create a program that asks the user for the number of a month, then creates the array F of (n+1) Fibonacci numbers, and prints the sequence.

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create a program that asks the user for the number of a
Reference No:- TGS0662724

Expected delivery within 24 Hours