Professional Documents
Culture Documents
Lab 09
Lab 09
Lab 09
The submission deadline for the assignment is Tuesday, October 24th, at 23:59 hours, via
the virtual platform. The submission should not be delayed beyond this deadline. The
assignment allows a maximum of two students to collaborate. Please note that groups
consisting of three students will not be permitted under any circumstances. Only one of the
two students should upload the report to Moodle.
The report for the assignment is expected to be written in English. Additionally, you are
required to present the assignment in class on Wednesday, October 25th.
Write a C++ function named apply_all that expects two arrays of integers and their sizes and
dynamically allocates a new array of integers whose size is the product of the 2 array sizes
The function should loop through the second array and multiplies each element across each element
of array 1 and store the
product in the newly created array.
You can also write a print function that expects a pointer to an array of integers and its size and
display the elements in the array.
Both arrays must be provided by cin.
For example,
Below is the output from the following code which would be in main:
Output
---------------------
Array 1: [ 1 2 3 4 5 ]
Array 2: [ 10 20 30 ]
Result: [ 10 20 30 40 50 20 40 60 80 100 30 60 90 120 150 ]
The code must be able to be copied and pasted
To accomplish this, kindly adhere to the sequential stages of the programming
methodology:
• Problem Analysis.
• Problem Specification.
• Algorithm Design.
• Algorithm Testing and Refinement.
• Code Implementation.
• Testing and Verification.