C++.NET

Moderators: Lundin
Number of threads: 99
Number of posts: 163

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
SUDOKU PUZZLE CODE!!!! Posted by MAGABENE on 26 Apr 2006 at 7:40 AM
HI! CAN SOMEONE PLEASE HELP ME WRITE THE CODE FOR THIS PROGRAM OR AT LEAST HELP ME WITH THE ALGORITHM.

PROGRAM DESCRIPTION:

Sudoku is a numerical puzzle. The puzzle consists of 9x9 squares arranged in a grid. This grid is further subdivided into 3x3 squares of size 3x3. Some numbers are initially placed on the grid. To solve the puzzle, a number between 1 and 9 (inclusive) must be selected for each square that is empty so that:

No number is duplicated in any row.
No number is duplicated in any column.
No number is in any of the 3x3 subgrids.
Write a program that allows a user to specify and solve a sudoku puzzle. Initially the 9x9 grid is empty, the user types in the numbers that are given for the puzzle. Thereafter, the user types in the numbers that he/she has computed to solve the puzzle at each stage.

Display the puzzle on the screen, with the entered numbers after each new number is entered. Note: The user can choose to enter a new number at any position he/she chooses, as long as there is no number there already.

After all squares have been filled with a number, check that the puzzle is a solution by making sure that the above constraints are satisfied. Note: there may be many, or perhaps no solutions to the puzzle.


Thread Tree
MAGABENE SUDOKU PUZZLE CODE!!!! on 26 Apr 2006 at 7:40 AM
Faz Re: SUDOKU PUZZLE CODE!!!! on 14 May 2006 at 2:26 PM
shellyrivers Re: SUDOKU PUZZLE CODE!!!! on 27 Nov 2009 at 9:59 PM
shellyrivers Re: SUDOKU PUZZLE CODE!!!! on 27 Nov 2009 at 10:01 PM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.