Question: Both programs should be in C++ using #include only and preferably with comments a. Write a C++ program that asks the user to enter N,
Both programs should be in C++ using #include

a. Write a C++ program that asks the user to enter N, the program should then output the Fibonacci series. Use do-while loop to 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. [5 marks] Fo = 0 F1 = 1 Any Fibonacci number is equal to the summation of the two previous numbers Fn = Fn-1 + Fn-2 Therefore, F2 = F1 + F. = 1+0 = 1 F3 F2 + F1 = 1+1 = 2 F4 = Fz + F2 = 2 + 1 = 3 Fn = Fn-1 + Fn-2 Enter N: 20 0 1 1 2 3 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. (5 marks] ********** ******* AAAAA BBBB CCC DD E ***** *** *
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
