7.3 Robots7 Assignments7.1 Getting Started7.2 Fibonacci Series

7.2 Fibonacci Series

 

Write a program that prints out the first 21 elements in the Fibonacci Series.

This program will probably use the for loop.

The series starts with a zero(0) and a one(1). Each subsequent number is the sum of the previous two numbers.

So:

Number the first number in the series, the zero with a zero. With this numbering LCD(Fn,Fm) = F(LCD(n,m)).

Your program need to print the following:

Other requirements:

Hints:

  1. Do NOT use recursion. Write an iterative program.

Study areas:

Extra credit:

Make sure that your program run sand prints the twenty-first Fibonacci number. Mark your output with:

Please turn your lab in to me, Louis Taber, during class, or slide it under the door of Santa Rita Building room A-115 (my office).


Instructor: Louis Taber, louis.taber.at.pima at gmail dot com (520) 206-6850
My web site in Cleveland, OH
The Pima Community College web site

7.3 Robots7 Assignments7.1 Getting Started7.2 Fibonacci Series