You are on page 1of 1

Write a script file that takes a matrix as an input and displays a menu of elementary row operations (interchanging rows,

addition of a multiple of a row to another, multiplying a row by a non-zero constant) together with an exit option. Display the resulting matrix after performing the desired row operation. The script should perform only one row operation (according to the user's selection)?

Instead of a script you can write a function whose inputs include the matrix, the required operation and the rows/constants required to perform the row operation according to the selection. The output of the function should also be - as in the script - the equivalent matrix after performing the row operation.? Note: In case of addition you need to specify in which row the result of addition will be displayed (e.g. if you add row 2 and row 3 the result of addition will be displayed in row 3 (or 2))

With my best wishes Eng. Sara Hassan

You might also like