|
-
Mar 11th, 2001, 07:19 AM
#1
Thread Starter
New Member
here is a matrix problem;
int matrix[10][12] = {
1, 0, 1, 0, 9, 5, 5, 5, 1, 0, 1, 0,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
1, 9, 9, 9, 1, 0, 1, 0, 5, 5, 5, 0,
0, 1, 0, 1, 0, 1, 9, 9, 9, 1, 0, 1,
1, 5, 5, 5, 1, 0, 1, 0, 1, 0, 1, 0,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
0, 1, 5, 5, 5, 1, 0, 1, 0, 1, 0, 1,
1, 0, 1, 0, 1, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 0, 1, 0, 9, 5, 5, 5, 9 };
how do i change from the above matrix to the below:?
1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0,
0, 0, 5, 5, 9, 1, 0, 1, 5, 5, 5, 1,
1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0,
0, 9, 0, 1, 1, 1, 9, 9, 0, 1, 0, 1,
1, 1, 9, 9, 0, 0, 1, 0, 9, 1, 0, 0,
0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1,
1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0,
0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1,
1, 0, 1, 0, 1, 9, 9, 9, 0, 1, 0, 9,
9, 9, 9, 9, 0, 1, 0, 9, 9, 9, 9, 9 };
where all numbers remains unchanged, except '5' are shifted to the top.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|