Problem Statement
Read a 3x3 matrix and print the sum of the main diagonal.
DEMO-OOP-33 โข Object Oriented Programming
Read a 3x3 matrix and print the sum of the main diagonal.
Input is given as whitespace-separated tokens in this order:
Print the exact report in this order:
Submit runs every public testcase in this browser. Results and code never leave this device.
1 2 3 4 5 6 7 8 9
Diagonal Sum: 15
9 8 7 6 5 4 3 2 1
Diagonal Sum: 15
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question