Question: (a) Write pseudocode for an algorithm called MatrixManip which takes as input two n x n integer arrays A and B and does the following:
(a) Write pseudocode for an algorithm called MatrixManip which takes as input two n x n
integer arrays A and B and does the following:
(i) calculatesthearrayC,thesumofthetwoarrays (ii) calculates the array D = 3C (iii)Calculates the difference between S1, the sum of the elements in the first array and
S2, the sum of the elements of the second array.
(b) Using a programming language of your choice, implement the algorithm MatrixManip. Be sure to output the results to the screen.
(c) Using a random number generator, populate two 5 x 5 matrices with numbers in the range from -30 to +50. Display your two arrays and the answers for part (a) above.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
