#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
int board[25];
const noughts=1;
const crosses=2;
const border=3;
const empty=0;
const int ConvertTo25[9]={
6,7,8,
11,12,13,
16,17,18
};
void InitialiseBoard(int *board){
int Index=0;
for(Index=0; Index<25;++Index){
board[Index]=border;
}
for(Index=0; Index<9; ++Index){
board[ConvertTO25[Index]]=empty;
}
}
void PrintBoard(const int *board){
int Index=0;
printf("\nboard:\n");
for(Index=0; Index<25;++Index){
if(Index!=0 && Index%5==0){
printf("\n");
}
printf("%4d",board[Index]);
}
printf("\n");
}
int main()
{
int board[25];
InitialiseBoard(&board[0]);
PrintBoard(&board[0]);
getch();
return 0;
}