It’s from the quiz for week 2. I understand we cannot discuss quizzes directly. What is the equation trying to achieve in two loops of i and j?
c[i][j] = a[j][i] + b[j]
It’s from the quiz for week 2. I understand we cannot discuss quizzes directly. What is the equation trying to achieve in two loops of i and j?
c[i][j] = a[j][i] + b[j]
Hello ketyeth,
Your given information is so limited.
As far as I understand the line c[i][j] = a[j][i] + b[j] is placed in 2 loops.
You can imagine C as a matrix and c[i][j]'s as matrix elements, the line c[i][j] = a[j][i] + b[j] assigns values to the elements of this matrix individually so you need to loop around both in horizontal and vertical directions to access each element and assign it a value.
I hope this help you to get your answer.