Question: PLEASE WRITE IN VBA: For this second part of the homework, you will solve the second ProjectEuler problem. The problems statement for problem 2 is
PLEASE WRITE IN VBA: For this second part of the homework, you will solve the second ProjectEuler problem.
The problems statement for problem is as follows:
Even Fibonacci Numbers
Problem
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with and the first
terms will be:
dots
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the evenvalued
terms.
Your solution must follow these guidelines:
a Your solution must exist in a single VBA Sub named: eulertwo
b This sub should be in a separate module from Part of this homework.
c Your sub will take zero arguments.
d The final step of your sub is to display the final result integer number to the user in a
message box.
e You must write all of the numbers that meet the condition evenvalued terms of the
Fibonacci sequence whose values do not exceed four million to a single column on the
worksheet.
f The values written to the sheet must be in ascending order.
The correct answer to this problem is
when thinking about how to generate the terms of the Fibonacci sequence, you will need to
use multiple integer variables to keep track of the necessary information to generate the next term in
the sequence. For example, three variables that will continually be updated will be two variables
which represent each of the last two terms in the sequence, and a third variable that represents the
next term generated. Additionally, you will need a variable that keeps track of what term of the
sequence you're on
For example, to start we might consider something like the following:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
