Question: Please help me to code this in C++. Please use Visual Studio You are going to use a 2D array to create a program that

Please help me to code this in C++. Please use Visual StudioPlease help me to code this in C++. Please use Visual Studio

You are going to use a 2D array to create a program that allows two users to play tic-tac-toe. Steps 1-3 are specifically focused on making sure that you understand how to use 2D arrays and required for the lab 1.Create a 2D character array in your main function and use nested for loops to fill the array with the letter 'e'to represent empty spaces 2. Create a nested loop to print the board on the screen 3. Alternate between two players: player'X'and player 'O. In their turn, each player will ask to place an "X or a 'O' in one of the 9 cells 4. The program will prompt both players, one at a time for the next move and the player will need to input 2 numbers for the coordinators of his/her play 5. Input validation: 1. Check that the space required by the player is empty 2. Check that the space required by the player is within the board bounces (each number can be 0, 1, or 2) 6. Program flow 1. Repeat until either someone wins or all spots are taken 1. Draw the board 2. Ask for coordinators from alternate player as a 2 integer input between O and 2 3. Accommodate an 'A or a 'B' on the board 7. Report who the winner is, or tie, if nobody won. Congratulate the winner 8. Ask if they want to play again (y) and start all over if they do

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!