Write TicTacToe. Read a 3 × 3 board as three words of three characters (X, O or . for empty) into a char[][]. Write the methods wins(char[][] board, char player) (a full row, column or diagonal) and count(char[][] board, char player).
Print the counts, then one verdict: X wins, O wins, Draw (board full, no winner), Game in progress, X to move (X plays first, so X moves when the counts are equal), or Impossible position (O has more marks than X, X has more than one extra mark, or both players have a winning line).
For the input
XOX
OXO
OXX
the program prints
X: 5, O: 4, empty: 0
X wins