i'm learning matrices. I found out how to get to plenty of positions in matrices, but there are still some i can't figure out and i got stuck with.
For example if we got matrice with height n=5, where i and j go from 0, i = rows, j = columns. (i don't use any array, just for in for)
Matrice:
00 01 02 03 04
10 11 12 13 14
20 21 22 23 24
30 31 32 33 34
40 41 42 43 44
When i want to get :
This is what i can't figure out
I don't want you to give me all the code i need i just want you to direct me to answer so i can figure it out by myself. This piece of code from parts i need must work for every height i want, not only for height 5.
And, if you could give me some good advice how to fix matrices problems, which methods did you use.
你可以结合的条件-例如,(10,20,30,21)将低于主对角线和上面的次对角线: if(i > j && i+j < n-1)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.