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
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
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]);](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F3c5e187b-d59b-4ba8-9e20-a373952aea25%2Fea4e8b6f-c3e1-4597-a306-6649f0477c8a%2F4qlmigd_processed.jpeg&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education