Reference no: EM13815680
C++ question, using xcode on a Mac. Must use an array and a function.
Write a program that will store 10 integers into an array. Only accept integers between -100 and 100. Display those integers. You must then square those integers by CALLING A FUNCTION to square each individual integer. That function must be called, square() and its only parameter should be the integer that you want to square. Display those integers in reverse order. Please note that you may only have one array. You must then take the total of the squared integers and get the average. Here is a sample run.
The ten numbers entered are:
1 2 3 4 5 6 7 8 9 10
Those same numbers squared in reverse order are:
100, 81, 64, 49, 36, 25, 16, 9, 4, 1
The total of the squared numbers is: 385
The average of the squared numbers is: 38