Question: Tic-Tac-Toe Write a program that allows two players (player X and player O) to play a game of tic-tac-toe. Use a two- dimensional char array
Tic-Tac-Toe Write a program that allows two players (player X and player O) 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 players take turns making moves and the program keeps track of whose turn it is. Player X moves first. The program should run a loop that: Displays the contents of the board array (see prompts and output , below). Prompts and allows the player whose turn it is to select a location on the board for an X in the case of player X or an O in the case of player O. The program should ask the player to enter the row and column number. Valid row or column numbers are 1, 2, or 3.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
