Starting from:
$30

$24

Programming Assignment 1 Solution

Write a C++ program to do the following :

1. Create two 2D Arrays ( Array_1 , Array_2 ). Each array is of size 3 x 3.

2. Write a function to populate both arrays with distinct random numbers

that are between 1 and 12.

3. Write a function to display both arrays.

4. Write a function to add Array_1 to Array_2 and place the result in Array_3.

Display Array_3.

5. Write a function to multiply Array_1 by Array_2 and place the result in

Array_3. Display Array_3.

6. Write a function to display the transposed of Array_1 .

7. Write a function to display the determinant of Array_1.

8. Write a display the sum of elements of each row in Array_1.

9. Write a display the sum of elements of each column in Array_1.

10. Write a display the sum of both diagonal elements in Array_1.

11. Use a function to determine whether Array_1 is a special array.

special Array is an arrangement of distinct numbers (i.e. each number is

used once), usually integers, in a array grid, where the numbers in each row,

and in each column, and the numbers in the main and secondary diagonals,

all add up to the same number.

12. Repeat steps 2 – 11 until the user terminates the program.






More products