3 Write a program to compute the sum of two matrices and then print it. Firstly user will be asked to enter the order of matrix (number of rows and columns) and then two matrices. For example if the user entered order as 2, 2 i.e. two rows and two columns and matrices as First Matrix:- 3 4 Second Matrix:- 4 5 -15 Then output of the program (sum of First and Second matrix) will be 5 7 2 9

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 22PE
icon
Related questions
Question
100%
3 Write a program to compute the sum of two matrices and then print it. Firstly user
will be asked to enter the order of matrix (number of rows and columns) and then
two matrices.
For example if the user entered order as 2, 2 i.e. two rows and two columns and
matrices as
First Matrix:-
3 4
Second Matrix:-
4 5
-15
Then output of the program (sum of First and Second matrix) will be
5 7
2 9
Transcribed Image Text:3 Write a program to compute the sum of two matrices and then print it. Firstly user will be asked to enter the order of matrix (number of rows and columns) and then two matrices. For example if the user entered order as 2, 2 i.e. two rows and two columns and matrices as First Matrix:- 3 4 Second Matrix:- 4 5 -15 Then output of the program (sum of First and Second matrix) will be 5 7 2 9
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage