Search:

Type: Posts; User: Norm

Search: Search took 0.20 seconds.

  1. Replies
    14
    Views
    1,630

    Re: Sudoku: wrong output?

    That means you are not reading the last line of the file. What if there are numbers on the last line?

    That is not the solution. You need to find the endless looping and fix it.
  2. Replies
    14
    Views
    1,630

    Re: Sudoku: wrong output?

    Now answer these questions I asked:
    Where does the printing stop? What is the last thing printed?
    What remains in the file to be read and printed?


    Does that mean the program is in a loop? ...
  3. Replies
    14
    Views
    1,630

    Re: Sudoku: wrong output?

    It's called debugging,
    It helps you find where the problem is. Where does the printing stop? What is the last thing printed?
    What remains in the file to be read and printed?
  4. Replies
    14
    Views
    1,630

    Re: Sudoku: wrong output?

    Is that all? It should print out all of the input file.
    And the output should look like this:
    x
    x
    x
    |
    x
    x
    x
    |
  5. Replies
    14
    Views
    1,630

    Re: Sudoku: wrong output?

    Add another println statement in the readInteger() method that prints out the value of word after it is returned from the readWord method.
  6. Replies
    14
    Views
    1,630

    Re: Sudoku: wrong output?

    Where do you read in the data to fill the grid array?
    Add this line to the read() method right after the end of the for(j) loop's ending } and still inside the for(i) loop:


    ...
  7. Replies
    14
    Views
    1,630

    Re: Sudoku: wrong output?

    Can you add comments explaining what is wrong with the output and post what it should be.
Results 1 to 7 of 7