1. Engineering
  2. Computer Science
  3. you are to write a program that will manipulate an...

Question: you are to write a program that will manipulate an...

Question details

You are to write a program that will manipulate an array. Your program should handle up to 100 integer numbers. Label the results for each printed out below. You will have several different outputs below. Print your results in the same order given below. For each part below, write one or more functions (there are a number of functions). Restriction: A function that does any of the calculations listed below can NOT print out the results in that function but you must print out results in either the ‘main’ routine or call a different function that only prints a result. A function does one task and only one task. ------------------------------------ 1. Read in the values into the array. The last value is a 0 and is NOT one of the values to be used in any of the calculation below. The input is found in arrayV3.dat 2. Print out all the values in the array with no more than 10 numbers per output line. 3. Print out the average of the set of numbers. 4. Print out the ‘range’ of the values in the array. (two values printed.) 5. Print out how many values are larger than the average and how many are smaller than the average. Pass average as a parameter. 6. Convert every negative number to a positive number. Print out the array. 7. Print out the average of the set of numbers. 8. How many numbers in the array are multiples of 9 and 17? 9. How many values in the array are greater than the 12th element in the array? 10. List the ‘range’ of values in the array. 11. Find the smallest number and print out the number and its position. 12. Zero out all even value numbers in the array and print out the array. 13. Print out the new average for the new array, ignoring the zeros. 14. Print out the ‘range’ of values in the array. 15. Create a second array. Copy all the data elements from the first array to the second array. Print out the second array. You will pass two arrays to this function. 16. Now copy all the data elements from the first array to the second array in reverse order. Print out the second array. You will pass two arrays to the reverse function. This is in C++

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution