Question
C++ You are to write a program that will perform calculations with a two dimensional array. The following functions are to be developed to support
C++
You are to write a program that will perform calculations with a two dimensional array. The following functions are to be developed to support a new development initiated by a local Multi-Optimal-Dimension Company (MAD COMP). Your program should handle any two dimensional square array up to 100 by 100. (Dimension your array 100 by 100). You will need two arrays in your program for some of the functions below. The user will supply you with the dimensions at the time your program starts running. The first two input from the file indicates the number of rows and columns to read in. (I will supply you a pseudo program to test you code with.)
You are to development the following functions to support this effort. Write a function for each of the following actions. The only functions you can have [ ]s are in the functions below. If you write any other function, besides the ones below, and need to pass the array you can use [ ]s in the Function Header only, but no [ ]s in the body of the function nor in the main pgm code.
Read reads in the array values
Print any ONE row (across the page) Print any ONE column (across the page)
Sum all values for any one row. Sum all values for any one column.
Find the largest number in any row.
Find the largest number in any column.
Find the smallest number in any row.
Find the smallest number in any column.
Function to return one value given the array, a row and column
Example function: AddaRow( array, rownbr) or AddaRow( myAry, 3)
Input: I will supply you a pseudo main program that will be used to test your functions. I will not be able to give you the actual code, because I will not know the name of your routines or the order of your arguments. You will write the main program to test your code.
Psueo Code:
Label all output
Read in data. First two numbers in input file is the number of rows followed by number of cols.
Print all rows
Compute and print average for all the values in the 2-d array
Compute and print totals for each row for rows 1st thru 10th
Compute and print totals for each column for col 4th thru 8th
Print out rows 1 thru 5
Print out columns 5 thru 9 (one column per line (across the page))
Find the biggest numbers in each odd numbered row.
Find the smallest number in each even numbered column.
Sum all the values for cols 3rd thru 6th (one number answer)
Sum all the values for rows 10th thru 22th (one number answer)
Sum together the biggest numbers from each column 2 thru 8 (one number)
Sum together the smallest numbers from each row 1 thru 22 (one number)
You are to write a program that will perform calculations with a two dimensional array.
Data:
25 11 24 50 17 -17 52 7 61 41 45 47 -12 28 64 10 44 74 78 25 10 19 74 -13 -15 36 75 65 4 -1 1 78 30 9 54 21 52 -5 50 82 18 77 -14 -6 5 16 56 47 24 -6 36 51 30 27 45 40 20 42 6 24 12 61 -1 18 73 25 71 -11 23 25 47 31 29 -12 73 12 53 33 -11 -16 76 31 12 6 67 37 39 23 49 59 14 -9 27 22 9 6 20 21 1 65 12 24 16 -2 22 41 -13 13 60 -11 56 69 4 28 7 55 53 12 60 56 80 -5 69 73 44 19 38 50 38 57 14 35 33 33 24 7 49 13 -10 74 -10 20 40 70 36 66 28 -8 -8 41 4 71 5 29 -11 13 -4 51 -17 74 45 38 -7 42 7 20 31 66 78 24 -15 33 74 19 57 3 79 4 31 82 51 67 64 17 36 82 1 21 -17 71 10 50 11 76 31 66 -10 4 -7 0 -4 -3 -8 -1 18 34 -17 32 2 39 81 -14 7 -9 27 -8 72 -15 78 68 76 26 6 70 -3 -14 31 64 10 44 74 78 1 10 19 74 -13 -15 36 45 65 42 -1 10 78 30 91 54 21 52 -5 56 82 12 77 -24 -25 5 16 56 45 24 -6 36 51 30 19 25 47 22 42 6 24 12 69 -10 29
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started