Question: This code shown below only shows the result of the multiplication process, I want an additional part of the code to show me the division
This code shown below only shows the result of the multiplication process, I want an additional part of the code to show me the division process so that the user appears to have the option to press 1 to multiply and 2 to divide or another code that applies this idea as shown in the picture.
#include
using namespace std;
int main()
{
int a[10][10], b[10][10], mult[10][10], r1, c1, r2, c2, i, j, k;
cout
cin >> r1 >> c1;
cout
for (i = 0; i
{
for (j = 0; j
{
cin >> a[i][j];
}
}
cout
cin >> r2 >> c2;
cout
for (i = 0; i
{
for (j = 0; j
{
cin >> b[i][j];
}
}
for (i = 0; i
for (j = 0; j
{
mult[i][j] = 0;
}
for (i = 0; i
for (j = 0; j
for (k = 0; k
{
mult[i][j] += a[i][k] * b[k][j];
}
cout
for (i = 0; i
{
for (j = 0; j
{
cout
CAUsers hi source repos 1. multiplication 2.division Select multiplication if (j == c2 - 1)
cout
}
}
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
