cp /home/fac/melissa/public_html/cs221/demos/array_example.cpp .Note the period at the end of the cp command, this is critical to get cp to copy the file to your current directory.
Compile and run the program using the following commands:
g++ -o demo array_example.cpp ./demoYou should see how the variables i and min get overwritten by using invalid subscripts for the array. This is why you, as the programmer, must keep track of the size of the array when accessing elements using the subscript operator.
Prompt the user for the number of doubles they wish to enter. Validate that it is a proper size (between 0 and the maximum number of elements for the array). Have one or more for() loops which reads the list of doubles from the keyboard and calculates the product of all the doubles. For example, the product of 2.5, 4.0, 10.0 is 2.5 * 4.0 * 10.0 = 100. Print the product out to the screen.
Name your code lab6.cpp. Email your completed code to me.