Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Re: How can I add a user input into a 2D- array and print it?

    Will the logic start at the bottom and work towards the top
    or will it start at the top and work towards the bottom?


    Ok, what are the details for that? The computer does not understand...
  2. Re: How can I add a user input into a 2D- array and print it?

    You need to work out the logic before writing code.
    What if there is already an "R" in the bottom row?


    Yes. That is the usual way to write programs - create methods for jobs that are done...
  3. Re: How can I add a user input into a 2D- array and print it?

    Create a method that prints the array.
    Then call it whenever the array has been changed.
  4. Re: How can I add a user input into a 2D- array and print it?

    theArray[row][column] = theValue;
    theArray - the name of the array
    row - the row index (an int)
    column - the column index (an int)
    = - an assignment statement
    theValue - the value to be assigned...
  5. Re: How can I add a user input into a 2D- array and print it?

    That is confusing.
    For me: Rows are horizontal (left, right) and columns are vertical(up, down).
    There isn't a bottom column of a row. There is a bottom row of a column.
  6. Re: How can I add a user input into a 2D- array and print it?

    I don't understand how a user picking a row puts a value in a column. How does the program pick the column?

    The bottom display of a filled in grid in post#2 shows the "R"s in column 4 not in row...
  7. Re: How can I add a user input into a 2D- array and print it?

    Did you mean column?

    Ok, I think I understand. What problems are you having placing the "R" in the array?
  8. Re: How can I add a user input into a 2D- array and print it?

    Can you explain how a user input of "4" can be used to place an "R" at a specific row and column in a 2 dim array?


    Please explain how the row and column for placing the "R" is computed?
Results 1 to 8 of 8