Sign in to follow this  
Followers 0
jaredman384

Qwestion,about Arrays

18 posts in this topic

I just have no idea where to even start.

post-513691-0-06261200-1389972656.jpg

Share this post


Link to post
Share on other sites

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.

1 person likes this

Share this post


Link to post
Share on other sites

Begin at the beginning, go on till you reach the end, then stop.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

I'd start with 'a'

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
 

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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:

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.