Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that uses only one subprogram to do one of the following calcula

ID: 3773057 • Letter: W

Question

Write a program that uses only one subprogram to do one of the following calculations over two two-dimensional run-time arrays: If the sizes of the two arrays are identical add them together. If the sizes of the two arrays are not identical then produce a product of the two arrays if the condition of the two matrices multiplication is valid. Otherwise, display a message saying that no arithmetic operation can be achieved over the two arrays. Also, the subprogram should return the sum of each array's elements. Repeat the program as long as the dimensions of the arrays are positive. Write the inputs and outputs in a "data" file and display on the computer screen.

Explanation / Answer

#include #include void main() { int a,i,k,j,c1,c2,r1,r2; int m1[10][10],m2[10][10],m3[10][10]; clrscr(); while(1) { printf(" 1. Transpose of Matrix:- "); printf(" 2. Addition of Matrix:- "); printf(" 3. Multiplication of Matrix:- "); printf(" 4. Exit "); printf(" Enter your choice:-"); scanf("%d",&a); switch(a) { case 1 : printf(" Enter the number of row and coloum:-"); scanf("%d%d",&r1,&c1); printf(" Enter the element :-"); for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote