Hello,
I have a write a 5x5 two dimensional array. In which i enter values for the first column and row using for loops to prompt the me to enter the values. Then I fill in the rest of the table with values calculated by summing the values in the table cell above and the table cell to the left of each cell.
The kth row of the matrix corresponds to array[k- 1]. The jth element in the kth row corresponds to the element array[k - 1][j - 1].
You can visit all elements of the matrix by using a nested loop in which the outer loop will loop over all the arrays and the inner loop will loop over each element of the current array
1 2 3
for k = 1 : 5
for j = 1 : 5
print array[k - 1][j -1]