Find largest sum will return the column with the largest


Computer science assignment

Write a complete C++ program that will contain the following:

a. Create a 2-dimensional array with 10 rows and 10 columns; Fill the array with random 3digit integers.

b. Find Largest Sum will return the column with the largest sum. If two or more columns, share the largest sum, print out only one column.

c. Find Smallest Value will return the smallest value within the given 2d array.

d. Subtract Average will calculate the average of the entries in a 2d array and subtracts thisaverage from every entry of the array.

For example, the main program may run as follows:

int main () {

int array2[][2] = { {1, 2}, {3, 4}, {2, 3}, {9, 9} };

cout << findLargestSum(array2, 4, 2) << endl; // prints 18

cout << findSmallestValue(array2, 4, 2) << endl; // prints 1

subtractAverage(array2, 4, 2);

return 0;

}

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Find largest sum will return the column with the largest
Reference No:- TGS01412629

Now Priced at $35 (50% Discount)

Recommended (97%)

Rated (4.9/5)