# Manuals/calci/GENERATESUDOKU

GENERATESUDOKU (Size,DifficultyLevel)

• is the order of the Sudoku.
• is the level of the Sudoku.

## Description

• This function creates the sudoku of the numbers.
• In , is the order of the rows and columns.
• is the level of the puzzle.
• Sudoku is one of the most popular Japanese puzzle game.
• It is based on the logical placement of numbers.
• The goal of Sudoku is to fill a rows entries and column entries which are left.
• To play Sudoku there is no requirement of any calculation nor any special math skills.
• The goal of a Sudoku is to fill in a 9x9 grid with the digits 1 to 9.
• So each row and column having 3x3 section which is containing numbers only one time.
• When we fill the numbers in Sudoku the following rules to be followed:
```1.Any row contains the numbers 1 to 9 not more than one time.
2. Any column contains the numbers 1 to 9 not more than one time.
3.Any 3x3  grid contains the numbers 1 to 9 not more than one time.
```
• The above rules only for the grid 9x9.
• But the function GENERATESUDOKU creates any size of the SUDOKU.
• So here the condition is the same numbers should not appear in the same row and same column.

## Examples

1. GENERATESUDOKU(3,2)

 1 1 2 1

2. GENERATESUDOKU(6,3)

 1 2 6 3 5 6 1 2 3 5 3 6 1 1 5 3 4 1 2

3. GENERATESUDOKU(10,1)

 1 2 3 4 5 7 8 9 5 6 7 8 9 10 1 2 7 8 9 10 1 2 4 5 6 2 3 4 5 6 7 8 10 4 5 6 7 9 1 3 8 9 10 1 2 3 4 5 7 2 3 4 6 7 8 9 10 5 6 8 9 2 3 4 8 9 10 1 2 3 4 5 6 2 3 4 5 8 9 10

Sudoku