- 1160

-1162

-1163

-1164

-1165

-1166

-1167

-1168

Write an interactive program C that plays tic-tac-toe. Represent the board as a three-by-three character array. Initialize the array to blanks and ask each player in turn to input a position. The first player's position will be marked on the board with an O, and the second player's position will be marked with an X. Continue the process until a player wins or the game is a draw. To win, a player must have three marks in a row, in a column, or on a diagonal. A draw occurs when the board is full and no one has won. Each player's position should be input as indices into the tic-tac-toe board that is, a row number, a space, and a column number. Make the program user friendly. After each game, print out a diagram of the board showing the ending positions. Keep a count of the number of games each player has won and the number of draws. Before the beginning of each game, ask each player if he or she wishes to continue. If either player wishes to quit, print out the statistics and stop.

989

988 is this really happening?

989 again!

989

998.3

998.29

998.2901

998.2901001

997

995

1000 - 6

993

993 - 1

991

990.9

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.