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 2 is as follows:
Even Fibonacci Numbers
Problem 2
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10
terms will be:
1,2,3,5,8,13,21,34,55,89,dots
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued
terms.
Your solution must follow these guidelines:
a) Your solution must exist in a single VBA Sub named: euler_two()
b) This sub should be in a separate module from Part 1 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 (even-valued 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 4,613,732.
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:
PLEASE WRITE IN VBA: For this second part of the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!