In this assignment you will be making Tic Tac Toe. Use a multi-subscripted array
ID: 3686106 • Letter: I
Question
In this assignment you will be making Tic Tac Toe. Use a multi-subscripted array for the board. You will need to print the board each turrn. Then, ask the user what square they would like their X or O. Then, the other player will choose (even more extra credit if the computer chooses.) Then, the computer will check the board to see if X won, O won, it is a tie, or the game is still going. If the game is still going, ask their next move. If it is a finished condition, let them know what happened, and then end, or ask if they want to play again.
Explanation / Answer
#include using namespace std; char square[10] = {'o','1','2','3','4','5','6','7','8','9'}; int checkwin(); void board(); int main() { int player = 1,i,choice; char mark; do { board(); player=(player%2)?1:2; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.