Question: C++ programming 2. [12 points] The sequence 1, 1, 2. 3, 5. 8, 13, ...is called Fibonacci's sequence and it is defined recursively as ti1,

C++ programming 2. [12 points] The sequence 1, 1, 2. 3, 5.C++ programming

2. [12 points] The sequence 1, 1, 2. 3, 5. 8, 13, ...is called Fibonacci's sequence and it is defined recursively as ti1, t, tn-1t-2 for nENand n> 2. Let Fibonacci's sequence mod 10 be defined as in 1-1, m2 1, and mn (mn-l mn-2) % 10 for n E N and n > 2 Write a program that verifies the following facts about Fibonacci's sequence mod 10 for the number of terms requested by the user: . Every third term is even. Every fifth term is divisible by 5 Every fifteenth term is 0. CPSC 1620 Assignment 5 Assume that the program will prompt the user to enter the number of terms repeatedly until the user wants to quit. Sample output: This is the Fibonacci Sequence mod 10 fact checker. How many terms do you wish to check? 17 3: 2-even 5: 5divisible by 5 6: 8 even 9: 4 even 10: 5- divisible by 5 11: 9 12: 4 - evern 13: 3 14: 7 15: 0even- divisible by 5- is zero 16: 7 17: 7 Would you try again (Y/N) N

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 Databases Questions!