brad 10.55 30.6 nels X30your program will output:
20.58Constraints
* 3 6 8 9 1 -3 4 8 -2 2 -7 1 5 3 4 5 -8 6 -7 1 6 -5 *3 8 7 6 5 4 2 4 5 0 4 -1 6 -2 0 -3 -2 4 -2 6 8 3 4and the row parameter is 2 and the column parameter is 1, then the selected row in matrix1 is [3 8 7 6 5] and the selected column in matrix2 is [4 6 2 6 -2] (I have denoted the selected row and column with asterisks) and the dot product is:
3*4 + 8*6 + 7*2 + 6*6 + 5*-2 = 12 + 48 + 14 + 36 - 10 = 100Here are the details on the two functions you will write:
3 5 3 6 8 9 1 1 5 3 4 5 3 8 7 6 5A sample invocation of this function would be:
vector<vector<int> > matrix; string filename; ... code to initialize the variables ... readMatrix(matrix, filename);
vector<vector<int> > matrix1, matrix2; int row, column; ... code to initialize the variables ... cout << dotProduct(matrix1, matrix2, row, column) << endl;