1. square grid with no of rows = cols = r, containing integers 1, 2, 3 …, r2 occupying the different cells,one integer per cell, so the sum of integers in each row= the sum of integers in each column = the sum of integers in each of the two diagonals.
2. for r>3
the algo is:
1. Empty all the...