/* Magic Square Program */ #include #include #include #include #include #include char matrix[3][3]; Displayboard (); void Pause () { printf ("\nPress Any Key to Continue..."); getch (); } int main () { /* "main prorgam lines" go here */ clrscr (); Displayboard (); //#define ROW 3 //#define COL 3 //int matrix [ROW][COL]; int r,c,num; for (r=0; r<2; r++) { for (c=0; c<2; c++) { //scanf ("%d",num); //matrix[r][c] = num; //gotoxy (32,10); //getc (matrix[r][c]); //gotoxy (30,12); //printf ("| | | |"); //gotoxy (30,14); //printf ("| | | |"); } } //Pause (); return 0; } Displayboard () { printf ("\n\n\n\n\n\n\n\n"); printf ("\t\t\t\t COLUMN \n"); printf ("\t\t\t\t 1 2 3 \n\n"); printf ("\t\t\t 1 %c | %c | %c \n", Square [0][0], Square [0][1], Square [0][2]); printf ("\t\t\t R ----------- \n"); printf ("\t\t\t O 2 %c | %c | %c \n", Square [1][0], Square [1][1], Square [1][2]); printf ("\t\t\t W ----------- \n"); printf ("\t\t\t 3 %c | %c | %c \n", Square [2][0], Square [2][1], Square [2][2]); printf ("\n\n\n\n\n\n"); return 0; }