Sum of Both Diagonals
Easy
Matrix Operations
Print the sum of the main and secondary diagonals of a square matrix, counting the centre element once.
Constraints
1 <= n <= 100
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.