Hey i have been trying to code the eight queens 2 dimensional array for awhile but i cant seem to get it correctly, please i will need some assistance from you intelligent minds, thank you. heres what ive done so for
I'm not sure what's going on either, but I do know that this algorithm should be implemented with a recursive function and yours does not have one, thus backtracking is not possible. Try googling for solutions to this problem. There are plenty of them. Also, don't use gotos.
First it helps to spell out what the Eight Queens problem is, for those of you who haven't played with this puzzle yet, it is a chess puzzle, the objective of which is to place eight Queens on a chess board so that none of them are in a possition to capture another.
Now are you writing this in order to figure the puzzle out? Or are you assumed to already know the algorythm?
Try giving your variables more descriptive names, i know while codeing it may be a good idea temporarily just to get you idea into code, but then go back and rename them so you can read them easier.