Problem with code

If i change the boundary condition in the if statement to-
if(i<0 || i>=10 || j<0 || j>=10 || board[i][j]==0)
it work but if I keep it like I’ve kept in the code it doesn’t work and I don’t understand why.
code-https://ide.codingblocks.com/s/323551

you have a global n and a n in main

1 Like

thanks!! works now!!

1 Like