Thread: Eight queens puzzle

  1. #1
    Registered User
    Join Date
    Dec 2017
    Posts
    1

    Eight queens puzzle

    I’m new, and I’m trying to learn c programming language, and I’m stuck while trying to make a program
    Here’s what I need to make
    “The chef wants to play chess and is trained by his coach. The chef knows all the rules of playing chess. To test the chief, coach gives him an assignement
    Coach arranges 8 Queens on a chess board and asks chef to check and tell him whether any of the 8 queens is threatening any of the 7 other queens. The chef is facing difficult to find out. Your job is to help chef find whether all queens are safe at their places and say whether the arrangement is valid or not “

    So I need to make a program in which I have an 8x8 array, the user put 8 queens on some selected places and then the program checks if it works. If you could help me I would really appreciate it
    Thanks in advance!

  2. #2
    Registered User
    Join Date
    Apr 2017
    Location
    Iran
    Posts
    138
    Quote Originally Posted by Nickge View Post
    I’m new, and I’m trying to learn c programming language, and I’m stuck while trying to make a program
    Here’s what I need to make
    “The chef wants to play chess and is trained by his coach. The chef knows all the rules of playing chess. To test the chief, coach gives him an assignement
    Coach arranges 8 Queens on a chess board and asks chef to check and tell him whether any of the 8 queens is threatening any of the 7 other queens. The chef is facing difficult to find out. Your job is to help chef find whether all queens are safe at their places and say whether the arrangement is valid or not “

    So I need to make a program in which I have an 8x8 array, the user put 8 queens on some selected places and then the program checks if it works. If you could help me I would really appreciate it
    Thanks in advance!
    Hi,

    You have a choice between bit-board or mailbox. Where bit-board has an edge on hardware. It consumes less memory and is light on CPU because of bit-twiddling.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with n queens
    By programmerc in forum C Programming
    Replies: 1
    Last Post: 02-03-2013, 01:38 PM
  2. 8 Queens
    By anirban in forum C Programming
    Replies: 1
    Last Post: 08-02-2009, 11:34 PM
  3. 8 Queens
    By Brad0407 in forum Contests Board
    Replies: 36
    Last Post: 06-25-2007, 10:37 AM
  4. and this is my solution for the 8 queens puzzle
    By negevy in forum C Programming
    Replies: 1
    Last Post: 09-01-2005, 11:45 AM
  5. 8 Queens
    By PutoAmo in forum C Programming
    Replies: 2
    Last Post: 03-24-2003, 04:45 AM

Tags for this Thread