Please help! I know I don't post here much, in fact, I don't post here at all, but this does not mean I am just some noob trying to get some easy code. I have been in programming for two years, and signed up to this website about the same time. I signed up because I was interested in programming, and thought I could make some useful contributions. Well, I was wrong! You guys knew way more than I do, and still do, as I am still a beginner Java programmer. So, I decided I would just lurk and watch conversations to try and gather up as much info as possible, and it helped, getting me through some tough programs. I was confident to say that I never had to ask for help on anything, because most of the time I could figure it out myself using the knowledge I gained with experience and by visiting this site. Well, that has changed!

I have been assigned a sudoku program that must check the answers of a Sudoku puzzle. Basically, the teacher inputs 9 rows and 9 columns of numbers, and the output must show if the row is ok(meaning none of the same numbers in the row), the column is ok, and the subgrid(3x3 square). I have no clue how I am going to get this done, all I know is I need a 2D Array! Sorry for the essay but can you guide me in the right direction?

Recommended Answers

All 2 Replies

I don't really know too much about how this game works, and don't really have the time or desire to investigate it at the moment, but a quick search turned up this:

http://today.java.net/pub/a/today/2005/11/29/solving-sudokus-in-java.html

This may be a bit more involved than you need, and it is more for generating and solving rather than checking, but it should definately help. Then again, it may be more than you really want.

Have fun. :-)

Check this:
http://kulandai.blogspot.com/2006/10/sudoku-puzzle-java-source.html

Please help! I know I don't post here much, in fact, I don't post here at all, but this does not mean I am just some noob trying to get some easy code. I have been in programming for two years, and signed up to this website about the same time. I signed up because I was interested in programming, and thought I could make some useful contributions. Well, I was wrong! You guys knew way more than I do, and still do, as I am still a beginner Java programmer. So, I decided I would just lurk and watch conversations to try and gather up as much info as possible, and it helped, getting me through some tough programs. I was confident to say that I never had to ask for help on anything, because most of the time I could figure it out myself using the knowledge I gained with experience and by visiting this site. Well, that has changed!

I have been assigned a sudoku program that must check the answers of a Sudoku puzzle. Basically, the teacher inputs 9 rows and 9 columns of numbers, and the output must show if the row is ok(meaning none of the same numbers in the row), the column is ok, and the subgrid(3x3 square). I have no clue how I am going to get this done, all I know is I need a 2D Array! Sorry for the essay but can you guide me in the right direction?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.