Question: write a programe in c language.Remember the tic-tac-toe game, in which 2 players X and O are playing the game on a 3x3 square board
write a programe in c language.Remember the tic-tac-toe game, in which 2 players X and O are playing the game on a 3x3 square board and the player having all his marks on horizontal, vertical, or main diagonal is a winner. You are given a square board (3x3 dimension matrix) having X and O in it. Find whether the player X wins the game or not.
X won: if any of the horizontal row, vertical column, or main diagonal of the board has all marks X in it.
| Sample Input (Main diagonal is underlined for your reference) | Sample Output
| |
| Matrix: X O X X X O X O O | ---> | Player X wins the game |
| Matrix: X O X X X O O O O | ---> | Player X doesnt win the game. |
| Matrix: X O X X X O O O X | ---> | Player X doesnt win the game. |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
