The orange is the assignment and the code is what I have. Can you help fix my code? 1. declare 2 matrices of size 100 in the main and initilize them (see below) 2. pass both matrices by VALUE to a function to multiply them 3. the main is to print the result of the multiplied matrices. Matrix 1: 5 9 13 17 21 25 29 33 37 41 6 10 14 18 22 26 30 34 38 42 7 11 15 19 23 27 31 35 39 43 8 12 16 20 24 28 32 36 40 44 9 13 17 21 25 29 33 37 41 45 10 14 18 22 26 30 34 38 42 46 11 15 19 23 27 31 35 39 43 47 12 16 20 24 28 32 36 40 44 48 13 17 21 25 29 33 37 41 45 49 14 18 22 26 30 34 38 42 46 50 *** *** *** *** *** *** *** *** *** *** 104 108 112 116 120 124 128 132 136 140... Matrix 2: 1 4 9 16 25 36 49 64 81 100 2 8 18 32 3 12 27 48 50 72 98 128 162 200 75 108 147 192 243 300 100 144 196 256 324 400 4 16 36 64 5 20 45 80 125 180 245 320 405 500 6 24 54 96 150 216 294 384 486 600 7 28 63 112 175 252 343 448 567 700 8 32 72 128 200 288 392 512 648 800 9 36 81 144 225 324 441 576 729 900 10 40 90 160 250 360 490 640 810 1000.. *** *** *** *** *** *** *** *** *** 100 400 900 1600 2500 3600 4900 6400 8100 10000.... SUBMISSION: 1. Submit your code with the constant reset to 10 (not 100) 2. Please use this code that prints the a part of the complete answer for the 100x100. This code prints the upper left 10x10 and the lower right 10x10 of the answe

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please send me answer of this question immediately and i will give you like sure sir 

The orange is the assignment and the code is what I have. Can you help fix my code?
1. declare 2 matrices of size 100 in the main and initilize them (see below)
2. pass both matrices by VALUE to a function to multiply them
3. the main is to print the result of the multiplied matrices.
Matrix 1:
5 9 13 17 21 25 29 33 37 41
6 10 14 18 22 26 30 34 38 42
7 11 15 19 23 27 31 35 39 43
8 12 16 20 24 28 32 36 40 44
9 13 17 21 25 29 33 37 41 45
10 14 18 22 26 30 34 38 42 46
11 15 19 23 27 31 35 39 43 47
12 16 20 24 28 32 36 40 44 48
13 21 25 33 37 45 49 ...
14 18 22 26 30 34 38 42 46 50
Show Transcribed Text
#include <iostream>
#include <vector>
***
104 108 112 116 120 124 128 132 136 140...
using namespace std;
const int MAXROW=100;
const int MAXCOL=100;
***
Matrix 2
1 4 9 16 25 36 49 64 81 100
2 8 18 32
50 72 98 128 162 200
75 108 147 192 243 300
100 144 196 256 324 400
125 180 245 320 405 500
150 216 294 384 486 600
3 12 27 48
4 16 36 64
5 20 45 80
6 24 54 96
7 28 63 112 175 252 343 448 567 700
8 32 72 128 200 288 392 512 648 800
9 36 81 144 225 324 441 576 729 900
10 40 90 160 250 360 490 640 810 1000...
***
***
Initialize(A);
Initialize(B);
***
***
}
return 0;
100 400 900 1600 2500 3600 4900 6400 8100 10000...
SUBMISSION
1. Submit your code with the constant reset to 10 (not 100)
2. Please use this code that prints the a part of the complete answer for the 100x100. This code prints the upper left 10x10 and the lower right 10x10 of the answer matrix.
***
Ans[0][0]=sum;
return;
***
matMul (A, B, Ans);
for (row=0; row<MAXROW; row++)
{
***
***
***
void Initialize (int A[][MAXCOL]);
void matMul (const int A[][MAXCOL], const int B[] [MAXCOL], int Ans [MAXROW] [MAXCOL]);
void print (vector <int> myVector);
void getIt (vector <int> &myVector);
int main ()
int A[MAXROW][MAXCOL], B[MAXROW][MAXCOL], Ans[MAXROW] [MAXCOL] = {};
int row, col;
for (col=0; col< MAXCOL; col++)
cout << Ans[row][col] <<
cout << endl;
J
void matMul (const int A[][MAXCOL], const int B[][MAXCOL], int Ans [MAXROW] [MAXCOL])
int k, sum=0;
for (k=0; k<MAXROW; k++)
sum = sum + (A[@][k] * B[k][0]);
Transcribed Image Text:The orange is the assignment and the code is what I have. Can you help fix my code? 1. declare 2 matrices of size 100 in the main and initilize them (see below) 2. pass both matrices by VALUE to a function to multiply them 3. the main is to print the result of the multiplied matrices. Matrix 1: 5 9 13 17 21 25 29 33 37 41 6 10 14 18 22 26 30 34 38 42 7 11 15 19 23 27 31 35 39 43 8 12 16 20 24 28 32 36 40 44 9 13 17 21 25 29 33 37 41 45 10 14 18 22 26 30 34 38 42 46 11 15 19 23 27 31 35 39 43 47 12 16 20 24 28 32 36 40 44 48 13 21 25 33 37 45 49 ... 14 18 22 26 30 34 38 42 46 50 Show Transcribed Text #include <iostream> #include <vector> *** 104 108 112 116 120 124 128 132 136 140... using namespace std; const int MAXROW=100; const int MAXCOL=100; *** Matrix 2 1 4 9 16 25 36 49 64 81 100 2 8 18 32 50 72 98 128 162 200 75 108 147 192 243 300 100 144 196 256 324 400 125 180 245 320 405 500 150 216 294 384 486 600 3 12 27 48 4 16 36 64 5 20 45 80 6 24 54 96 7 28 63 112 175 252 343 448 567 700 8 32 72 128 200 288 392 512 648 800 9 36 81 144 225 324 441 576 729 900 10 40 90 160 250 360 490 640 810 1000... *** *** Initialize(A); Initialize(B); *** *** } return 0; 100 400 900 1600 2500 3600 4900 6400 8100 10000... SUBMISSION 1. Submit your code with the constant reset to 10 (not 100) 2. Please use this code that prints the a part of the complete answer for the 100x100. This code prints the upper left 10x10 and the lower right 10x10 of the answer matrix. *** Ans[0][0]=sum; return; *** matMul (A, B, Ans); for (row=0; row<MAXROW; row++) { *** *** *** void Initialize (int A[][MAXCOL]); void matMul (const int A[][MAXCOL], const int B[] [MAXCOL], int Ans [MAXROW] [MAXCOL]); void print (vector <int> myVector); void getIt (vector <int> &myVector); int main () int A[MAXROW][MAXCOL], B[MAXROW][MAXCOL], Ans[MAXROW] [MAXCOL] = {}; int row, col; for (col=0; col< MAXCOL; col++) cout << Ans[row][col] << cout << endl; J void matMul (const int A[][MAXCOL], const int B[][MAXCOL], int Ans [MAXROW] [MAXCOL]) int k, sum=0; for (k=0; k<MAXROW; k++) sum = sum + (A[@][k] * B[k][0]);
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education