A C program (Please DONOT used cin, cout endl) Only printf andscanf … of a Tic Tac Toe game … Person VS Computer. No morethan 500 lines Thank you. because the program i am running thesystem on does not understand cout or cin … Thank you. andcomputer must Win
Answer
CODE
#include <stdio.h>
#include <stdlib.h>
char matrix[3][3]; /* the tic tac toe matrix */
char check(void);
void init_matrix(void);
void get_player_move(void);
void get_computer_move(void);
void disp_matrix(void);
int main(void)
{
char done;
printf(“This is the game of Tic Tac Toe.n”);
printf(“You will be playing against the computer.n”);
done = ‘ ‘;
init_matrix();
do {
disp_matrix();
get_player_move();
done = check(); /* see if winner */
if(done!= ‘ ‘) break; /* winner!*/
get_computer_move();
done = check(); /*