• 0

Qwestion,about Arrays


Question

17 answers to this question

Recommended Posts

  • 0

Please see here. We're not going to give you the answer, you need to let us know what you think is the correct answer and why.

 

He is not asking for the answer just where to start.

Link to comment
Share on other sites

  • 0

He is not asking for the answer just where to start.

There's not really enough information to determine what his first steps should be. We have no idea what he's learned already or what he's tried.

Link to comment
Share on other sites

  • 0
 

I just have no idea where to even start.

 

A(2, 4) = 40 relates to the value stored in a specific row and column of array A.  The rest you should be able to work out yourself

Link to comment
Share on other sites

  • 0

He is not asking for the answer just where to start

There is no question asked other than the one on the assignment, no indication of what he doesn't understand about the question. Is he having trouble understanding what an array is, or has he gone through the question and arrived at an answer that isn't an option?

Link to comment
Share on other sites

  • 0

I think OP is confused by the 5 x 7 empty array on the bottom.  I'm not sure what it's supposed to represent, since s is a simple variable and illustrated as a single cell above it.

Link to comment
Share on other sites

  • 0

Hello,

Just for the hell of it, did it in Excel. Took 2 minutes. Don't be so lazy ;)

:laugh: Yup, it isnt even a programming question.
Link to comment
Share on other sites

  • 0

I think OP is confused by the 5 x 7 empty array on the bottom.  I'm not sure what it's supposed to represent, since s is a simple variable and illustrated as a single cell above it.

It's suppose to be the spot to fill in A except the person who made the document is really bad at word processing and counting  :rolleyes:

Link to comment
Share on other sites

  • 0

It's suppose to be the spot to fill in A except the person who made the document is really bad at word processing and counting  :rolleyes:

 

Ha!  I thought that initially, too, but Question A is declarative to variable s and the rest are to a, so it can't be.  OP, ask your teacher what the empty array at the bottom is supposed to be, or shade it out so that it's a 6 x 5 array with the answers in the correct places then create a square for variable s.

 

I'm with OP:  the format is confusing.

Link to comment
Share on other sites

  • 0

On second thought, you could just write a "5" in the top left corner, and you'd be technically right.  That's the sort of thing I would do ... then I'd get a zero on the assignment.

Link to comment
Share on other sites

  • 0

On second thought, you could just write a "5" in the top left corner, and you'd be technically right.  That's the sort of thing I would do ... then I'd get a zero on the assignment.

Fairly sure you are just suppose to write "5" where the S is printed and that the blank cells were suppose to be shifted to the right and centered under the "A" (and 6x5)

Link to comment
Share on other sites

  • 0

Fairly sure you are just suppose to write "5" where the S is printed and that the blank cells were suppose to be shifted to the right and centered under the "A" (and 6x5)

 

Fairly sure you're right.  I was making a funny.

Link to comment
Share on other sites

  • 0

I just have no idea where to even start.

You need to fill the grid with the values obtained after executing the 6 statements. Each of these statements assigns a new value to either S or one of the squares of the grid (denoted by A(X, Y)).

 

That said the result grid seems to have one too many rows; it should be the same size as the original. I would ask the teacher to clarify that point.

Link to comment
Share on other sites

This topic is now closed to further replies.