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 form's 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.