1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
saveliy_v [14]
3 years ago
10

make 2 dimensional arryas, ask for the rows and columns, then enter the values and then multiply both arrays.

Computers and Technology
1 answer:
Gemiola [76]3 years ago
6 0

Answer:

The program of this question can be given as:

Program:

#include <iostream>      //header file.

using namespace std;

int main()         //define main method.

{

   int First_matrix[10][10], Second_matrix[10][10], multiplication[10][10], rows, columns, i, j, k;  //define variable.

   cout<<"Enter the rows of matrix:";        

   cin>>rows;              //insert rows.

   cout<<"Enter the columns of matrix:";  

   cin>>columns;                        //insert columns

   cout<<"Enter elements of first matrix:"<< endl;     //inserting elements of second matrix

   for(i = 0; i < rows; i++)

   {

       for(j = 0; j < columns; j++)

       {

           cin >> First_matrix[i][j];

       }

   }

   cout<< "Enter elements of second matrix:"<< endl;          //inserting elements of second matrix

   for(i = 0; i < rows; i++)

   {

       for(j = 0; j < columns; j++)

       {

           cin >> Second_matrix[i][j];

       }

   }

   // multiplication of matrix.

   for(i = 0; i < rows; i++)

   {

       for(j = 0; j < columns; j++)

       {

           multiplication[i][j]=0;

           for(k = 0; k < columns; k++)

           {

               multiplication[i][j] =multiplication[i][j] +First_matrix[i][k] * Second_matrix[k][j];

           }

       }

   }

   // Displaying matrix.

   cout<< "First Matrix: " << endl;

   for(i = 0; i < rows; i++)

   {

   for(j = 0; j < columns; j++)

   {

       cout<<" "<<First_matrix[i][j];

   }

   cout<<endl;

   }

   cout<< "Second Matrix: "<<endl;

   for(i = 0; i < rows; i++)

   {

   for(j = 0; j < columns; j++)

   {

       cout<<" "<<Second_matrix[i][j];

   }

   cout<<endl;

   }

   //Displaying multiplication of matrix.

   cout << endl << "multiplication of Matrix: " << endl;

   for(i = 0; i < rows; i++)

   {

   for(j = 0; j < columns; j++)

   {

       cout<<" "<<multiplication[i][j];

   }

   cout<<endl;

   }

   return 0;

}

Output:

Enter the rows of matrix: 2

Enter the columns of matrix:2  

Enter elements of first matrix: 1

2

4

3

Enter elements of  second matrix:5

4

3

1

First Matrix:

1  2

4  3

Second Matrix:

5  4

3  1

multiplication of Matrix:

11  6

29  19

Explanation:

In the above matrix (2-dimensional array) program firstly we insert the rows and columns for creating a user-defined matrix. Then we insert the first matrix by using a loop. In this loop, we used row and column that is inserted by the user. Similarly, we insert the second matrix. then we multiply the matrix. In the multiplication, we define 3 loop that is (i,j,k). first loop(i) work on the rows and the second and third loop(j,k) work on the columns. In the last first we print matrix (first, second). Then we print there multiplication.

You might be interested in
What difference between plagiarism and fair use?
Alekssandra [29.7K]
Plagiarism is quite a bad thing because if you plagiarize, you are copying and pasting other people's work and using the work as yours (even though you change the sentence structure/ some words, it is still plagiarizing.) Fair use means un-biasness.
7 0
4 years ago
When creating loyal customers you must develop all of the following except: a. Smooth relationships b.customer marketing c. Dedi
bixtya [17]

Answer: I think a

Explanation: sorry I’m in wrong, have a great day!! :D

7 0
3 years ago
Read 2 more answers
Series-connected 11-pF and 21-pF capacitors are placed in parallel with series-connected 22- pF and 30-pF capacitors. Determine
Naya [18.7K]

Answer:

19.9 pF

Explanation:

Given that:

Series connection :

11pF and 21pF

C1 = 11pF ; C2 = 21pF

Cseries = (C1*C2)/ C1 + C2

Cseries = (11 * 21) / (11 + 21)

Cseries = 7.21875 pF

C1 = 22pF ; C2 = 30pF

Cseries = (C1*C2)/ C1 + C2

Cseries = (22 * 30) / (22 + 30)

Cseries = 12.6923 pF

Equivalent capacitance is in parallel, thus,

7.21875pF + 12.6923 pF = 19.91105 pF

= 19.9 pF

8 0
3 years ago
You have a shared folder named Reports. Members of the Managers group have been given Write access to the shared folder. Mark Ma
Anna71 [15]

Answer:

Following are the solution to the given question:

Explanation:

The common folder called Report has also been shared. Writing access to a shared folder was given to management group members. Mark is a member of a group of managers. We can access the files within your reporting directory, but you really should not access the Confidential.xls file. We want to add Mark Mangum to our ACL files using Deny permissions on Confidential.xls.

5 0
3 years ago
Respond to the following in 2-5 paragraphs. Give an example of how you can demonstrate active listening.
nadezda [96]
Hey my name is ..... and this do the thesis
8 0
3 years ago
Other questions:
  • How to find i with superposition method
    8·1 answer
  • ____ is a practice where a user in enticed by possible rewards and then asked to provide personal information.
    14·1 answer
  • The max-age attribute of a cookie is specified in
    13·1 answer
  • Security controls are measures taken to protect systems from attacks on the integrity, confidentiality, and availability of the
    6·1 answer
  • The set of rules for how computers talk to one another is called
    12·1 answer
  • Which of the following code is correct? I: print("Programming is fun") print("Python") print("Computer Science") II: print("Prog
    11·1 answer
  • Sarah has prepared a project document about the small and medium-sized companies in the United States. While proofreading, she r
    11·2 answers
  • A unit of measurement that describe the rate that electricity flows through a wire is an
    14·1 answer
  • I think my knee....
    14·1 answer
  • Which of the following items in the folder window allows users to view locations which have been visited before?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!