Write a program that will either read integer values from a file or create random integers and store the values in a 4 x 5 array. Set constants for ROW and COL to indicate the size of the array.
Call the following functions:
• beading: This function that will print out your standard name and program explanation. • fillArray: This function will open the file for reading, fill the array, and dose the file or create random integers. Use a nested for loop to read into the 4 x 5 array. Arrays are automatically pass-by-reference. o Function heading should be similar to: voidfill Arrg(hit myA[ROW] [COL]) o Function call should be similar to: fillArray(myArray);
After the above functions, use a switch statement with menu options to call functions that will perform the following actions:
• print Array: This function will be passed the array and will print the contents of the array in table form. • sum Atny: This function will be passed the array and will return the sum of all of the integers in the array. • min Amry: This function will be passed the array and will return the minimum value in the array. • max Array: This function will be passed the array and will return the maximum value in the array. • double Arregr: This function will be passed the array and will double each value in the array. When print Array is called after double.Array, each value printed will be twice the original value.
Last Completed Projects
topic title | academic level | Writer | delivered |
---|