Originally Posted by
mfm12002
I need to create a matrix that looks like the user input. the just enter the example i showed above of how the matrix should look, and i need to scan it and put it in an actuall matrix i create by the user inputs of hight, width and the matrix example that user entered. the user dosent actually insert a matrix. i need to transform it into a matrix.
I am aware of all of that. What I am asking is, if I handed you this:
Code:
int a_matrix[3][7] = {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18},{19,20,21}};
and asked you to print it out, could you do so? (I'm also trying to hint that this is the "same" problem as what you're attempting.)
(And now that I look at it, how you do this will depend somewhat on how you create your matrix, of which there are three ways to do that I can think of right now, so we'd have to get that straight as well.)