| Message |
I take the original question to be a typo, as it doesn't make sense to talk about a multi-dimensional (3x5), one-dimensional array. I presume the word "one" was left there by mistake.
As for the answer, I would say that as columns is the inner loop, they will be set more quickly than rows. So I would answer with a 2-dimensional graph, showing that 0,0 was set first, 0,1 second, and so on. And if I didn't get a good score I would complain. ;)
So more or less what Terry said in his post before mine, without all the extra stuff setting variables, eg.
sales[0][0], sales[0][1], sales[0][2], sales[0][3], sales[0][4];
sales[1][0], sales[1][1], sales[1][2], etc.
The question didn't say anything about assigning variables, nor did it say to "write some C code ...".
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|