A 3 by 4 matrix M is to be added to another 3 by 4 matrix array N so as to give a third 3 by 4 matrix array P.
A 3 by 4 matrix M is to be added to another 3 by 4 matrix array N so as to give a third 3 by 4 matrix array P. Using a high level programming language, write a program segment that assigns the sum of M and N to P.
Program add matrix (input, Output);
Matrix = Array (14, 13) of integer;
A, B, C: Matrix;
I, J: Integer;
Producer add (Var X, Y, Z: Matrix);
For I: to 3 do
For J: 1 to 4 do
Z [l,J]: X [l, J] + Y[l,J];
Follow AtikaSchool.Org on our Social Channels
This gives you an opportunity to get our latest uodates, changes and firsthand information
Don't give up, Keep Searching for more
Click to set custom HTML