For m = {{1,2,3},{4,5,6},{7,8,9}}, what is the sum of m[i][i] for i=0..2?
- A
9
- Bcheck_circle
15
- C
12
- D
6
Explanation
1 + 5 + 9 = 15 (main diagonal).
AP Computer Science A· difficulty 4/5
For m = {{1,2,3},{4,5,6},{7,8,9}}, what is the sum of m[i][i] for i=0..2?
9
15
12
6
Explanation
1 + 5 + 9 = 15 (main diagonal).
Want 10 more like this — adaptive to your weak spots?