Question: include using namespace std; a. Write a C++ program that asks the user to enter N, the program should then output the Fibonacci series. Useldo-while

include
using namespace std;  include using namespace std; a. Write a C++ program that asks
the user to enter N, the program should then output the Fibonacci

a. Write a C++ program that asks the user to enter N, the program should then output the Fibonacci series. Useldo-while loopyto ask user to re-enter N if the user entered a number below 2. Hint: The first two numbers in the Fibonacci series are 0 and 1. 15 marks] Fo = 0 F1 = 1 Any Fibonacci number is equal to the summation of the two previous numbers F = Fn-1 + Fn-2 Therefore, F = F + Fo = 1 + 0 = 1 F3 = F2 + F1 = 1+1 = 2 F = F3 + F2 = 2 + 1 = 3 Fy = FN-1 + FN-2 Enter N: 20 011 23 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 b. Write a program that use loops to print the following patterns separately, one below the other. In your code use for, while and do-while loops to generate the patterns, use one loop for each question. 15 marks] * ** 1 12 123 1234 1 2 3 4 5 ***

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!