Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

//argv [1]: number of rows in the matrix 1 (r1) //argv [2]: number of columns in the matrix 1 (c1) //argv [3]: number of rows

//argv [1]: number of rows in the matrix 1 (r1)

//argv [2]: number of columns in the matrix 1 (c1)

//argv [3]: number of rows in the matrix 2 (r2)

//argv [4]: number of colums in the matrix 2 (c2)

cout << "Multiply matrix"<

cout << endl;

int * * matrix3 ;

matrix3 = new int *[r1];

for (int i = 0; i

{

*(matrix3 + i) = new int [c2]; // the column

}

for (int r3 = 0; r3 < r1; r3++)

{

for (int c3 = 0; c3 < c2; c3++)

{

int sum = 0;

for ( int a = 0; a < c1; a++)

{

sum += (*(*(matrix1 + r3) + a) * (*(*(matrix2 + a) + c3)));

}

*(*(matrix3 + r3) +c3) = sum;

cout << *(*(matrix3 + r3) + c3) << " ";

}

cout << endl;

}

Why does it not display the result for multiply matrix?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago