printing diagonals from a matrix

后端 未结 0 1404
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-13 02:34

this is the matrix i need to print a diagonals from:

1 2 3
4 5 6
7 8 9

i need to print 1, 5, 9 and 3, 5, 7 (separately)

it also should

相关标签:
回答
  • 消灭零回复
提交回复
热议问题