Last edited by reds; 04-26-2011 at 02:21 PM.
Hmm...did that code by any chance come from one of these two sites?
- View topic - Program to Solve 8 Queens Problem in C • India Largest Job Discussion Forum • IndiaJobForum.com
It looks suspiciously similar.
If you're taking a class that requires you to solve the 8 queens problem, you certainly can write a loop and ask for user input. I strongly suggest you take time to understand the 8 queens problem and some chess basics, if you don't know them already. Then, think about a solution to the problem, and see what you can code up on your own to find just one solution to the problem. It will give you a much better idea of how to adapt the algorithm to find multiple solutions. Here are a couple sites to get you started:
EDIT: And when you come back with your attempt at this solution, please format your code decently. The mess you posted makes me want to stab my eyes out.