I have Sudoku checker assignment for my class and my task is to be able to create a code that will ask how many puzzles the user would like to solve then they'll input all of the numbers themselves. After they input all the numbers, the output would be either "Yes" or "No" in response to if the puzzle(s) are correct. So far I've been able to manipulate code to let the user input all of the numbers but I'm stuck on how to be able to check if each number in the same row, column, and 3x3 square are not repeated. Any tips on how to help me get started on checking would be grateful because I'm completely stumped on this part.
Heres my code so far
#include <stdio.h>
#define COL 9
int main (void)
{
int n, i, j,array[100][COL];
int check=0;
scanf("%d", &n); //Enter how many puzzles you want to solve
//For loop that goes through every position in the puzzle(s)
for(i=0;i<n*9;i++)
{
for(j=0;j<COL;j++)
{
//array[i][j]=0;
//printf("Array[%d][%d]=%d\n", i,j,array[i][j]);
scanf("%d", &array[i][j]); //User entry for puzzle(s)
}
}
return 0;
}