This is my first computerclass, so we are not working in any language. Write a m
ID: 3615225 • Letter: T
Question
This is my first computerclass, so we are not working in any language.
Write a module (you may assume global variables) to calculateand display a Fibonacci series between26 and 270. Include an appropriate module header AND allnecessary statements in the module (including the return statement)to solve the problem. Do not “read in” the data,use assignment statements to set the range. It is NOTnecessary to write the complete algorithm, just themodule.
A Fibonacci series startswith a pair of numbers (usually 0 and 1) and adds those two numberstogether to get a third number. Drop off the first number andrepeat the adding of the two numbers to get a third number. For example, here is an example Fibonacci series starting with0:
0 1 1 2 3 5 8 13 . . .
The logic goes asfollows:
0 plus 1 equals1
Drop off 0 and repeat with1 plus 1 equals 2
Drop off 1 and repeat with1 plus 2 equals 3
Drop off 1 and repeat with2 plus 3 equals 5
Drop off 2 and repeat with3 plus 5 equals 8
Drop off 3 with 5 plus 8equals 13
And so on . . .