# \$50 prize to who ever can write this code

• 06-16-2011, 01:29 AM
owencain
\$50 prize to who ever can write this code
• 06-16-2011, 01:35 AM
kjkrum
I can write it. I won't, but I can.

I'd like that in cash, please.
• 06-16-2011, 02:35 AM
Norm
Why do you want to pay someone to do something you could do yourself?
• 06-16-2011, 02:36 AM
Toll
I'm no math geek myself, but it looks like all normal array operations. Shouldn't be too hard to do it, really.

Not that I will, mind you. I generally don't do other people's homework.

EDIT: Hmm... Five lines of code, I think. Should be all it takes.
• 06-16-2011, 03:13 AM
owencain
• 06-16-2011, 03:16 AM
Toll
Take it step by step. What, exactly, are they after? Are you able to do it with pen and paper? If so, translate that to code. If not, figure out how to do it with pen and paper first.
• 06-16-2011, 03:17 AM
owencain
what do you mean pen and paper? I do not understand the assignment at all, thats why i need some serious help
• 06-16-2011, 03:21 AM
Norm
Start with a piece of paper and pencil. Write a matrix with the x,y values for the source and then write down the x,y values for the target matrix. Look at the pattern. For example the 1 at row 0, col 1 goes to row1 , col 0
For this case x,y becomes y,x.
When you see the pattern, make a 3x3 matrix and do the same and look for the x,y pattern.
Then try to write a loop for the row and an inner loop for the column and work out the logic there. Again use a piece of paper and pencil and play computer with the x,y or row, col to get the pattern.
• 06-16-2011, 03:22 AM
Toll
I mean... do you understand how the transpose works? If I gave you a matrix, would you be able to transpose it? Try transposing this, for instance:
Code:

```[ 5 2 8 ] [ 4 8 1 ] [ 2 7 3 ]```
If you can't figure out how to do that by hand, then you most likely won't be able to do it with code. Google it if you have to (I assume there's some pages out there about it; I've not looked myself, to be honest).
• 06-16-2011, 03:50 AM
pbrockway2
Double post : http://www.java-forums.org/new-java/...lp-arrays.html

@OP: I'm not trying to be mean, but please recognise that nobody here is going to write your code for you, neither in this thread nor the other. The interest (and there's plenty of it) is in your understanding not your passing the course. So what is important is the code you write, not the code that others might write for you. Follow (and follow up on) Norm's suggestion.
• 06-16-2011, 05:06 AM
Fubarable
He seems to be only interested in cheating. I am going to lock this thread and ban him unless others feel strongly otherwise. I don't think that there's much redeeming him.