Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

hey guys, im suppose to write a function that determines if thespecified value c

ID: 3618630 • Letter: H

Question

hey guys, im suppose to write a function that determines if thespecified value can go in the specified row and column withoutviolating the sudoku. I got most of the code done, it checks if theselected row and col is valid that row and column Im just havingsome trouble working an algorithm to see if its valid inside thelocal square. Here is my code so you can get an idea what im doing(By the way its in C programming):
int check_validity(int sudo[9][9], int user_input, int row,int col) {   int i,j,update = 0;      /* When column is fixed */   for (i=0;i < 9;i++) {    if (user_input == sudo[i][col]) {    update = !0;    }   }      /* When row is fixed */   for (j=0;j < 9;j++) {    if (user_input == sudo[row][j]) {    update = !0;    }   }      /* Check if value is valid in local square*/   ?      return update;    }
If someone could give me some ideas that would be great,thanks ;)
int check_validity(int sudo[9][9], int user_input, int row,int col) {   int i,j,update = 0;      /* When column is fixed */   for (i=0;i < 9;i++) {    if (user_input == sudo[i][col]) {    update = !0;    }   }      /* When row is fixed */   for (j=0;j < 9;j++) {    if (user_input == sudo[row][j]) {    update = !0;    }   }      /* Check if value is valid in local square*/   ?      return update;    }
If someone could give me some ideas that would be great,thanks ;) int check_validity(int sudo[9][9], int user_input, int row,int col) {   int i,j,update = 0;      /* When column is fixed */   for (i=0;i < 9;i++) {    if (user_input == sudo[i][col]) {    update = !0;    }   }      /* When row is fixed */   for (j=0;j < 9;j++) {    if (user_input == sudo[row][j]) {    update = !0;    }   }      /* Check if value is valid in local square*/   ?      return update;    }
If someone could give me some ideas that would be great,thanks ;)

Explanation / Answer

Never mind guys i was able to solve it thanks ;)