Question: Write a program that takes number values between (1-7), and turns it into bit values and turns the bit value into a tic tac toe
Write a program that takes number values between (1-7), and turns it into bit values and turns the bit value into a tic tac toe game. Using basic C++
For example:
Input Row 1: 3
Input Row 2: 4
Input Row 3: 7
| Row 1 | O | X | X |
|---|---|---|---|
| Row 2 | X | O | O |
| Row 3 | X | X | X |
Third Row Same Who won?: X
1. User Row Input: Your program must ask the user to input the decimal representation of each row. Remember to validate the user's input to enforce that the values are between 0 and 7.
2. Display 3x3 Grid: Your program must then display the match representation of the given numbers.
3. Validate Match: If the given match is not possible then you must ask the user to input valid values.
| X | X | O |
| X | X | O |
| X | X | O |
Not a valid Tic-Tac-Toe game!
4. Who won?: If the given match is a valid Tic-Tac-Toe game then you must then determine who won and the mark combination that led the player to his victory.
5. Play Again?: In the end, you must ask the user if he wishes to play again. If he does then ask for his input again, otherwise end the program.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
