exercisesApril408

exercisesApril408 - Golden Ratio (The most irrational...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
COMP202 Instructor: Ladan Mahabadi April 4, 2008 Fibonacci Numbers: These ubiquitous numbers are defned by the Following linear recurrence equation: ±(n) = ±(n-1) + ±(n-2) where ±(1) = ±(2) = 1 Write a recursive program that receives as input a positive integer n and outputs ±(n).
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Golden Ratio (The most irrational number!) The ratio of successive Fibonacci numbers approaches the golden ratio. Write a program that takes m and computes x_m as de±ned below:...
View Full Document

This note was uploaded on 04/14/2008 for the course COMP 202 taught by Professor Verbrugge during the Winter '07 term at McGill.

Page1 / 2

exercisesApril408 - Golden Ratio (The most irrational...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online