Get premium membership and access questions with answers, video lessons as well as revision papers.

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...

      

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.

  

Answers


Kavungya
Program add matrix (input, Output);
Type
Matrix = Array (14, 13) of integer;
Var
A, B, C: Matrix;
I, J: Integer;
Producer add (Var X, Y, Z: Matrix);
Begin (add)
For I: to 3 do
Begin
For J: 1 to 4 do
Z [l,J]: X [l, J] + Y[l,J];
End
End; {add}
Kavungya answered the question on June 25, 2019 at 07:50


Next: List any four high level programming languages
Previous: The first column in the table below contains the formulae as stored into the cell F10 of a spreadsheet. Enter the formulae, as they would appear...

View More Computer Studies Questions and Answers | Return to Questions Index


Learn High School English on YouTube

Related Questions