Question: Part 3 : write a program to determine the winner of a tic tac toe board For this program the user will enter 9 chars
Part : write a program to determine the winner of a tic tac toe board
For this program the user will enter chars they will represent a tic tac toe board from left to right, top to bottom for example the input XOOOXXXOX represents
X O O
O X X
X O X
and x is the winner.
you can use cin x y z p q; or longer to get a bunch of space seperated input at once from the user
if there is no winner it will print out it was a tie"
Code provided:
#include
using namespace std;
int main
cout"Enter the board left to right, top to bottom: ;
if b b && b b
winner b;
if b b && b b
winner b;
if b b && b b
winner b;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
