Question: Write a program in C++ that stores the following elements in a two dimensional array and prints out the product of all the diagonal elements
Write a program in C++ that stores the following elements in a two dimensional array and prints out the product of all the diagonal elements of the array. Use Nested For Loops to traverse the array to calculate the product. The elements of the array are as follows :
12 22 34 45
33 1 2 5
4 98 21 13
3 21 45 11
You should display the product of the following elements: 12 x 1 x 21 x 11 x 3 x 98 x 2 x 45
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
