Question: In c++ create a sodoku program begin by creating a 2D array to store the Sudoku board. Then populate all 9x9 elements of the array.
In c++ create a sodoku program begin by creating a 2D array to store the Sudoku board. Then populate all 9x9 elements of the array.
Your program does not need to get input from the user.
Part 1:
Begin by writing code to verify
The first row
The first column
The upper left 3x3 square.
Hint: begin by writing code to display the upper left 3x3 square.
Part 2:
Then, write a separate function for each of these tasks:
verify row i, where i is the row number.
verify column i, where i is the column number.
verify a 3x3 square beginning at row i and column j,
Each of these functions should return a Boolean value to indicate if the verification succeeded or failed.
Your functions should not use global variables. Each function should be passed the information it needs as parameters.
Call these functions from within loops, so your code will be much more concise!
Make sure to test your program with both valid and different types of invalid boards.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
