Please use C++

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Please use C++

Post by answerhappygod »

Please use C++
Please Use C 1
Please Use C 1 (25.47 KiB) Viewed 32 times
Please Use C 2
Please Use C 2 (42.14 KiB) Viewed 32 times
Matrix Addition and Subtraction: In this lab, you are going to implement a matrix calculator. Theory: Adding matrices Given A=[43​87​] and B=[15​02​], let's find A+B. We can find the sum simply by adding the corresponding entries in matrices A and B. This is shown below. A+B=[43​87​]+[15​02​] =[4+13+5​8+07+2​]=[58​89​]​
For example, let's consider C=[20​89​] and D=[511​63​] We can find C−D by subtracting the corresponding entries in matrices C and D. This is shown below. C−D​=[20​89​]−[511​63​]=[2−50−11​8−69−3​]=[−3−11​26​]​ Task: 1. Ask the user about what kind of operation he/she likes to do. If the user press "a" then perform addition or for "s" perform subtraction. End the program with an error message fo other character input. 2. Take two matrix inputs. Each matrix should be 2×2 size. 3. Display the input matrices and output matrix properly.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply