Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(10 points) Write a C++ program to add two matrices a and b and save the result in c . The program should prompt the

(10 points) Write a C++ program to add two matrices a and b and save the result in c. The program should prompt the user to enter two 33 matrices, display the matrices and their addition.

image text in transcribed

Sample Run:

Enter a 3 X 3 matrix: 100 45 -3 4 -12 20 67 20 -9

Enter a 3 X 3 matrix: 10 20 -30 1 2 3 -4 -100 50

Matrix1:

100 45 -3

4 -12 20

67 20 -9

Matrix2:

10 20 -30

1 2 3

-4 -100 50

The addition of the matrices is:

110 65 -33

5 -10 23

63 -80 41

a11 a12 13 a21 a22 a2b21 b2 b23a2b21 a22 b22 a23 +b23 a31 a32 a33/ 11 012 013 21 22 b31 b32 b33/ 632 33 +

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

Students also viewed these Databases questions

Question

Which personal relationships influenced you the most?

Answered: 1 week ago