https://github.com/vasikyrg/eight-queens
Eight queens problem which i tried to solve it when i was in my first semester in university.
https://github.com/vasikyrg/eight-queens
c
Last synced: 2 months ago
JSON representation
Eight queens problem which i tried to solve it when i was in my first semester in university.
- Host: GitHub
- URL: https://github.com/vasikyrg/eight-queens
- Owner: vasikyrg
- Created: 2022-02-10T22:01:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-10T22:03:39.000Z (over 3 years ago)
- Last Synced: 2025-01-24T08:43:58.835Z (4 months ago)
- Topics: c
- Language: C
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Eight-Queens
Eight queens problem which i tried to solve it when i was in my first semester in university.Chess is played on a square chessboard consisting of eight rows and eight columns. The 'Queen' from a given position on the chessboard, can move horizontally (ie along the entire line of the chessboard), vertically (ie across the entire chessboard column) or diagonally. We say that a 'Queen' can "attack" another piece, if she can move to the square where the other piece is in the next move.
In the problem of the 8 Queens1, it is required to place 8 Queens on the same chessboard so that no Queen is threatened (ie can not be attacked by anyone else).
Write a program in C that dynamically binds an 8x8 board representing a chessboard. Then, during the execution of the program, ask for the position for each of the 8 Queens.Then write a function to check if this solution is acceptable. Your main to show if this solution is correct or not, using this function.