Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PROBLEM TO SOLVE: Given a specified distance from the golden ratio, determine how many Fibonacci numbers must be generated in order to get this close.

PROBLEM TO SOLVE: Given a specified distance from the golden ratio, determine how many Fibonacci numbers must be generated in order to get this close. Note that there are no units involved; the distance isthe absolute value of the difference between two numbers of data type Double. To do this you will need to implement a loop. First complete Lab8. After completing Lab8, make a Project3 folder in your CS account; copy the completed Lab8 program into your Project3 folder. Recall that the project was named GoldenRatio. The source code file was named GoldenRatio.vb. Now make the changes needed to convert the Lab8 program to the program to solve the Project3 problem. Here are a few hints to help you get started:

1. Change the Text property of the forms labels to match what is seen in the sample output at the end of this document.

2. For this project you need to declare only one constant: 3 Const GOLDEN_RATIO As Double = 1.6180339887

3. The difference between the current ratio of the last two fibs and the golden ratio must be unsigned. To do this use the absolute value function as follows: diff = Math.Abs(GOLDEN_RATIO - ratio)

4. After exiting the loop, display the fib numbers generated in the Text property of the resultTxt TextBox.

5. To determine how many Fibonacci numbers were generated you can set up a loop counter; we called this numFibs in the Lab8 program.

6. Grading rubric available on Canvas in the Project 3 assignment.

7. The following are Sample Outputs:

image text in transcribed

image text in transcribed

0.5 How close to the Golden Ratio should we get? Calculate Fibonacci Numbers generated 0, 1, 1, 2 It required calculating Fibonacci numbers to get this close to the Golden Ratio

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago