7.10: Tic Tac Toe (sort of). (c++)
Write a program that will allow two users to playtic-tac-toe. The program should ask for movesalternately from player X and player O. Theprogram displays the game positions as follows:
123
456
789
The players enter their moves by entering theposition number (a single digit, 1-9) theywish to mark. After eachmove, the program re-displays the changed board.A sample board configuration is as follows:XXO
O89
SAMPLE RUN #1: ./ETest
Interactive Session
1 2 34 5 67 8 9
Enter move:1
X 2 34 5 67 8 9
Enter move:2
X O 34 5 67 8 9
Enter move:3
X O X4 5 67 8 9
Enter move:4
X O XO 5 67 8 9
Enter move:5
X O XO X 67 8 9
Enter move:6
X O XO X O7 8 9
Enter move:7
X O XO X OX 8 9
Enter move:8
X O XO X OX O 9
Enter move:9
X O XO X OX O X
Game over!
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here