kodingwindow@kw:~$ g++ kw.cpp kodingwindow@kw:~$ ./a.out
__________
1 | 2 | 3
--+---+--
4 | 5 | 6
--+---+--
7 | 8 | 9
__________
Player "X" turn> 5
__________
1 | 2 | 3
--+---+--
4 | X | 6
--+---+--
7 | 8 | 9
__________
Player "O" turn> 1
__________
O | 2 | 3
--+---+--
4 | X | 6
--+---+--
7 | 8 | 9
__________
Player "X" turn> 3
__________
O | 2 | X
--+---+--
4 | X | 6
--+---+--
7 | 8 | 9
__________
Player "O" turn> 4
__________
O | 2 | X
--+---+--
O | X | 6
--+---+--
7 | 8 | 9
__________
Player "X" turn> 7
Player X wins!
__________
1 | 2 | 3
--+---+--
4 | 5 | 6
--+---+--
7 | 8 | 9
__________
Player "O" turn> q
Exit
kodingwindow@kw:~$
Advertisement
Thank You
Dear User, Thank you for visitng Kodingwindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the Kodingwindow Android app. We intend to soon make it available on the Google Play Store. Currently, Android versions 10 and up require manual apk installations. Would you like to get the app?