A=zeros(5,5) # it represent 5x5 matrix having 0 number

for i in 1:5

for j in 1:5

A[i,j]=i+j # square bracket for indices.as indices start from 1

end

end

A

output :5x5 Array

2.0 3.0 4.0 5.0 6.0

3.0 4.0 5.0 6.0 7.0

4.0 5.0 6.0 7.0 8.0

5.0 6.0 7.0 8.0 9.0

6.0 7.0 8.0 9.0 10.0