Question: IN JAVA Write a program to sum, subtract, multiply and divide the content of two 2 x 2 matrices and store the result in a

IN JAVA
Write a program to sum, subtract, multiply and divide the content of two 2x2 matrices and store the result in a third matrix. Then print the content of the third matrix. The array will hold double numbers.
First, the program will prompt the user to enter the content of two arrays A and B and then sum the content of both arrays and store it in C. The program will print the content of array C.
Second, the program will prompt the user to enter the content of two arrays A and B and then subtract B from A and store it in C. The program will print the content of array C.
Third, the program will prompt the user to enter the content of two arrays A and B and then multiply the content of both arrays and store it in C. The program will print the content of array C.
Fourth, the program will prompt the user to enter the content of two arrays A and B and then divide the content of A by B and store it in C. The program will print the content of array C.
Test your program on
Sum
1256
3478
Sub
8822
4521
Multiply
1358
2522
Divide
10852
7433

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!