Question: Please write in C++ Write a program that allows two players to play a game of tic-tac-toe. Use a two-dimensional char array with three rows
Please write in C++

Write a program that allows two players to play a game of tic-tac-toe. Use a two-dimensional char array with three rows and three columns as the game board. Each element of the array should be initialized with an asterisk ('*'). The program should run in a loop that Displays the contents of the board array Allows player 1 to select a location on the board for an X. The program should ask the user to enter the row and column number. Allows player 2 to select a location on the board for an O. The program should ask the user to enter the row and column number. Determine whether a player has won, or a tie has occurred. If a player has won, the program should declare that player the winner and end. If a tie has occurred, the program should say so and end. payer 1 wins when there are three X's in a row, in a column, or on a diagonal on the game board. Payer 2 wins when there are three O's in a row, in a column, or on a diagonal on the game board. A tie occurs when all of the locations on the board are full, but there is no winner
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
