/* * eight_queens.c -- * * Place eight queens on a chess board so that not two queens threaten * each other. A chess board has 8 x 8 squares, and a queen threatens * the chess pieces on the same row, the same column, or the same diagonal. */ #include struct position { int row; int col; }; int is_valid(struct position queens[], int row, int col); void print_chess_board(struct position queens[]); int main() { return 0; } void print_chess_board(struct position queens[]) { int i,j; for (i=0; i<8; i++) { for (j=0; j<8; j++) { if (queens[i].col == j) printf("X "); else printf("o "); } printf("\n"); } }