Question: Write a C++ program (just a main function) which declares a two-dimensional array of integers A [4] [4] and fills it with values entered by

 Write a C++ program (just a main function) which declares a

Write a C++ program (just a main function) which declares a two-dimensional array of integers A [4] [4] and fills it with values entered by the user. The program mist calculate the sum of main diagonal elements, the sum of first secondary diagonal elements and the sum of second secondary diagonal elements. Finally, the program must determine whether all of these values are equal or not and must display a corresponding message. The three diagonals are represented in the diagram below 8 2 Let A - The sum of each diagonal =11 (they are equal) First secondary diagonal Main diagonal Second secondary diagonal For this example, your program should display: 'The diagonals are equal

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!