Now use the array indicies to offset the value by the number of rows (with the appropriate number of columns) and by the leftover columns. Trial and error should get it if nothing else.

Honestly, it's almost less work to do it the way you have it there.

Honestly, it's almost less work to do it the way you have it there.

Maybe ( i actually disagree ), but that solution wouldn't extend very well at all.

OP: think about how you would mentally walk over a matrix visiting every element. Think about the system you use to ensure that you visit every single element. Now, think about how you could write down instructions describing how to walk the matrix. Think about how to write these instructions so that another person who has no idea of what a matrix is or what it is for could still walk over the matrix and visit every element. If you carefully and thoughtfully do that, you should see that the instructions contain two logical loops with one nested inside of the other. Try to apply the logic of those instructions in code.

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...

Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.

This is the result of previous question answered :

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...