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];
P.O Box 1189 - 40200 Kisii
Tel: 0728 450 424
Tel: 0738 619 279
Tel: 0763 450 425
E-mail - email@example.com