One Dimensional Array Exercise
Write a C++ program that includes the following:
- MAIN GOAL: Write and use a function with four parameters: three arrays and one size.
- Two arrays will already have values.
- One array will hold the differences between the values in the other two arrays.
- The size is the number of values in each of the arrays.
- In the main( ) function, include the following:
- Declare three integer arrays of size 10.
- Ask user to enter 10 numbers for two arrays.
- Call a function that calculates the differences between the values in the two given arrays and stores the results in the third array.
- Print out the array that contains the difference (all the array elements).
Copyright: Department of Computer Science, University of Regina.