Question: This is a program assignment, she wants the program done in the format like the second picture. So just add the correct codes in the
CSC 260L Laboratory 10 Spring 2018 Some Fun with Recursion Examine the code of recursive functions in Lab10.cpp and see below Write the following two functions in the Lab10.cpp file and run each on the array int arr [10-400, 3, -66, 7, -6, 201, 199, -4, 0, 77 (1) Write a recursive function that prints out the values of and integer element function from index size-1 to 0. EXAMPLE: if the array in the parameter to the function were int al4]- (9, 5, 33, 2), the output would be 2 33 5 9. Name this function as firstlnitialLastNamePrintRecursion (2) Write a value-returned recursive function to return the number of integer array elements that are either 99. (50 points each) Name this function as firstlnitialLast Write a test program (with main)) to test your two functions out. Be sure that your output is self-explained with nice descriptive sentences to show what will be printed out. For example, you can print out the original array first, then you can print out the list by using recursive algorithm, and last you can print out the numbers that are either 99 [Bonus -20 points) Use STL vector as your data structure. Generate any number (random) of element (including positive and negative numbers) to the vector before calling the 2 recursive functions. This must be well documented in order to receive the points. A RECURSIVE FUNCTION is a function that calls itself Example: int fn( int n if(n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
