Opening the reading…
Opening the reading…
DSA FUNDAMENTALS › MATRIX BASICS
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Store the running 5 x 5 matrix and use matrix[i][i] for the left diagonal and matrix[i][n - 1 - i] for the right diagonal. Print both diagonals on separate lines, including 13 in both lines.
OUTPUT
Sample1 7 13 19 25 5 9 13 17 21
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.