Question: Review your lecture notes, particularly data types, cin, cout, loops, pointers, arrays and dynamic memory allocation, then develop a program that dynamically creates an integer

 Review your lecture notes, particularly data types, cin, cout, loops, pointers,

Review your lecture notes, particularly data types, cin, cout, loops, pointers, arrays and dynamic memory allocation, then develop a program that dynamically creates an integer array of size n, where n is an integer that is obtained after prompting the user for the desired array size and then storing his keyboard input in variable n. The program s elements have a value of 1, and every other element thereafter is the sum of the previous two elements, thus: Value of array element 0 should be l Value of array element 1 should be l Value of array element 2 should be 1+1 = 2 Value of array element 3 should be 2+1 = 3 Value of array element 4 should be 3+2 = 5 Value of array element 5 should 5+3 8 hall the n initialize the array using a Fibonacci sequence. In a Fibonacci sequence, the first two HINTS: for the array Use the new keyword to dynamically allocate memory Before your program ends, you need to use the delete keyword de-allocate the memory More information a https://en.wikipedia.org/wiki/Fibonacci_number Try to first design your algorithm (in pseudo code, plain English, or a flow chart), and then code what you've designed in C++ . bout Fibonacci sequences may be found on . . Test your code before you submit it. . Debug your code; If it did not work properly, ask why (from a high level) did it not work? Is it an algorithmic or coding error? Use the debugger to identify the root-cause and fix your code What to hand in: The actual code in a.cpp" file

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!