Question: This is an introductory C++ course and i need some help with this program. You can completely disregard the coding for finding the prime number


This is an introductory C++ course and i need some help with this program. You can completely disregard the coding for finding the prime number because i already figured that out. I do really need help finding the fibonacci numbers though. Since this is a introductory course I do need to use relatively basic code and im NOT allowed to use arrays on this problem. Instead im supposed to to devleop a "helper" variable in order to seek out the code for the fibonacci portion. If someone could do this and explain the code that would be extremely helpful and I will thumbs up the problem.
The Fibonacci numbers are defined by aj = 1,22 = 1 and an = An-1 +an-2 for n > 3. The first seven Fibonacci numbers are 1, 1,2,3,5,8,13. Your program should ask the user for a positive integer N and then output the Nth Fibonacci number and Nth prime number If the user enters 5, the output of your code should exactly match what's shown below. (Don't forget the period at the end of the line.) Example output: Enter a positive integer: 5 The 5th Fibonacci number is 5. The 5th prime number is 11. example, the user enters 2. it is okay if your code says "2th" rather than "2nd". You may assume that the user enters valid input and you do not need to worry about if they enter a number N so large that the N-th prime number or N-th Fibonacci can't be stored as an int. Note: Different textbooks define the Fibonnaci sequence slightly differently. For this problem, you should use the definition given above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
