Created
February 19, 2010 05:25
-
-
Save anonymous/308459 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <stdio.h> | |
#define _h 196 //horizontal | |
#define _v 179 //vertical | |
#define _ul 218 //upper left corner | |
#define _ur 191 //upper right corner | |
#define _ll 192 //lower left corner | |
#define _lr 217 //lower right corner | |
#define _d 194 //t down | |
#define _u 193 // t up | |
#define _l 180 // t to the -| | |
#define _r 195// t to the |- | |
#define _c 197 // cross -|- | |
void display (char x[][7]) { | |
int i, j; | |
printf (" 1 2 3 4 5 6 7\n"); | |
printf (" %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n", _ul, _h, _d, _h, _d, | |
_h, _d, _h, _d, _h, _d, _h, _d, _h, _ur); | |
for (i=0; i < 7; i++) { | |
printf ("%d%c", i+1, _v); | |
for (j=0; j < 7; j++) { /* columns */ | |
printf ("%c%c", x[i][j], _v); | |
} | |
printf ("\n"); | |
if (i == 5) break; | |
printf (" %c", _r); | |
for (j=0; j < 7; j++) { /* columns */ | |
printf ("%c%c", _h, _c); | |
} | |
printf ("\b%c\n", _l); | |
} | |
printf (" %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n", _ll, _h, _u, _h, _u, | |
_h,_u, _h,_u, _h, _u, _h,_u, _h, _lr); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment