The goal of this lab is to give you practice in writing programs using 1-dimensional arrays and functions. You will also use the debugger to verify that your program works.
0 < n <= 20The program then reads in n integers and saves them in an array. You may assume that the number of elements in the array will not exceed 20. Name your program lab5.cxx.
list (to get the line numbers), break <linenumber> (to set a breakpoint), run (to start the program),
print <variable name> (to check the current
value of a variable), cont (to run up to the next breakpoint).
Be sure to pass the array to the function as a parameter. You should also pass the current size of the array as a parameter.
Here is a sample execution...
Input an integer between 1 and 20: 8 Input the list: 12 4 5 2 7 19 26 8 12 ************ 4 **** 5 ***** 2 ** 7 ******* 19 ******************* 26 ************************** 8 ********
/cs/bin/turnin submit cs1005 lab5 lab5.cxx lab5.script