Question: (C++) Plan and code a modular program utilizing arrays. Use at least three functions to solve the problem. Input numbers from a textfile. Input the

(C++)Plan and code a modular program utilizing arrays. Use at least three functions to solve the problem.

Input numbers from a textfile. Input the numbers, one by one.

Store the even numbers in one array. Store the odd numbers in a second array.

Determine the average, highest, lowest value for the even array.

Output all numbers higher than the average for the even array.

Determine the average, highest, lowest value for the odd array.

Output the numbers higher than the average for the odd array. Label and output all values (high, low, average, numbers greater than the average) and each array. Clearly label all output.

Note You MUST write ONE function to find high, lowest, and average for any array. Use this function once for evenarray and the same function once for the odd array. Write one function to output numbers higher than theaverage. Use once for the even array and once for the odd array.

Input Numbers, one at a time, from the file shown below. Create the data file below in text editor or Notepad.

Data File 46 30 82 90 56 17 95 16 48 26

4 58 0 78 92 60 12 21 63 47

19 41 90 85 14 -9 52 71 79 16

80 51 95 102 34 10 79 95 61 92

89 88 66 64 92 63 66 64 39 5

Output The contents of each array, the high, low, average for each array and a listing of the values higher than theaverage.

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!