Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with a C++ program dealing with arrays. Here is the description: You

ID: 3527500 • Letter: I

Question

I need help with a C++ program dealing with arrays. Here is the description: You are to write a program that will manipulate an array. Your program should handle up to 50 integer numbers. Label the results for each print 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) ------------------------------------ 1. Read in the values into the array. The input is found in arrayV2.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 array. 4. Print out how many numbers is larger than the average (one value) and how many are smaller than the average (one value). Pass average as a parameter. 5. Print out the values in the array that are in the even position of the array. That is printout ary[0], ary[2], ary[4]

Explanation / Answer

//That was a pretty long project. Please rate. #include #include using namespace std; const int MAX= 50; void Read(int[],int& num);//reads in file into array void printWholeArray(const int[],int);//prints out whole array double getAverage(const int[],int);//returns average void DisplayCprCnts(double, const int[],int,int);//diplays count of number large than avg and count smaller than avg void printEvenIdx(const int[],int);//prints even index elements void printEvenValues(const int[],int);//prints even value elements void reverseSigns(int[],int);//reverse each element's sign void FirstLastSwap(int[],int);//swaps first and last element void multiplesCount3or11(const int[],int);//counts multiples of 3 and/or 11 void printMin(const int[],int);//prints min number and index void printMax(const int[],int);//prints max and index int main(){ int ary[MAX]; int numberCount; double average; //1 read in array Read(ary,numberCount); //2 print array printWholeArray(ary,numberCount); //3 print array average average=getAverage(ary,numberCount); cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote