Question: You are to write a program that will manipulate an array. Your program should handle up to 50 integer numbers. You will have to count

You are to write a program that will manipulate an array. Your program should handle up to 50 integer numbers. You will have to count the number of inputs you have to use in all your loops below.

For each print out produced below, label the results. Also print your output in the order listed below. Use functions to process the data below.

Read in the values into the array. The input is found in on Blackboard for numbers.dat file. Send your output to a file and print the file with your code.

Print out all the values in the array with no more than 10 numbers per output line.

for (i=0; i

{ if ( ( i+1 ) % 10 ) cout << endl; // carriage return some times.

Print out the average of the numbers.

Print out the largest number.

Print out the smallest number.

Compute and print out the sum of the even numbers in the array.

Compute and print out the average of the even numbers.

Compute and print out the sum of the odd numbers in the array.

Compute and print out the average of the odd numbers.

Reverse the sign of each number in the array. (Positive numbers become negative etc)

Print out the average for the new array.

24 43 63 -72 73 72 9 92 -8 83 -36 73 5 38 56 17 93 26 19 62 72 8 4 38 27 22 27 64 7 44 26 -36 62 78 -67 34 73 93 8 -3 -2 2 27 1 11 12 -73 83 0

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!