Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 759 Bytes

README.md

File metadata and controls

16 lines (12 loc) · 759 Bytes

Problem 2

Write code to multiply an array x by a matrix y. Array x has size of 1xn, while matrix y has size of nxn, so the result is a 1xn array.

Your function should call another function multiply () that multiplies two arrays and return a value (e.g. copy function from problem 3 of assignment 3).

Hint: You will also need to call your transpose( ) function from problem 1 to transpose the y matrix for correct result. Remember to include ../problem-1/main.h for that.

Edit the multiply( ) function in the main.cpp file. The function takes x, y, and n as input and returns the result array as the output.

Do not write a main function. Only edit the part marked with // Write your code here