Write a C++ program that inputs a square matrix and reverse the contents of its diagonal values.
Example
{1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16}
output
{4 2 3 1
5 7 6 8
9 11 10 12
16 14 15 13}
Please help in getting a code i know how to add, subtract and multiply but i cannot seem to undersand how this works.
Start with a program that reads a square matrix and then prints it. Show that code.