Skip to content

Instantly share code, notes, and snippets.

@egcodes
Last active May 5, 2017 17:56
Show Gist options
  • Save egcodes/6245294 to your computer and use it in GitHub Desktop.
Save egcodes/6245294 to your computer and use it in GitHub Desktop.
print format text
#include <stdio.h>
#include <ctype.h>
int main(int argc, char *argv[]) {
char ch_code[] = {
0, 0, 0, 0, 0, 0,12,18,33,63,
33,33,62,32,62,33,33,62,30,33,
32,32,33,30,62,33,33,33,33,62,
63,32,62,32,32,63,63,32,62,32,
32,32,30,33,32,39,33,30,33,33,
63,33,33,33, 4, 4, 4, 4, 4, 4,
1, 1, 1, 1,33,30,33,34,60,36,
34,33,32,32,32,32,32,63,33,51,
45,33,33,33,33,49,41,37,35,33,
30,33,33,33,33,30,62,33,33,62,
32,32,30,33,33,37,34,29,62,33,
33,62,34,33,30,32,30, 1,33,30,
31, 4, 4, 4, 4, 4,33,33,33,33,
33,30,33,33,33,33,18,12,33,33,
33,45,51,33,33,18,12,12,18,33,
17,10, 4, 4, 4, 4,63, 2, 4, 8,
16,63
};
char str[100];
int i, j;
sprintf(str, argv[1]);
for (i = 2; i < argc; i++)
strcat(str, argv[i]);
for (j = 0; j < 6; j++) {
for (i = 0; str[i] != '\0'; i++) {
int ch_temp = ch_code[(toupper(str[i]) - 'A') * 6 + 6 + j];
int count = 6;
while (count--)
printf("%c", (64 & (ch_temp <<= 1)) > 0 ? '#' : ' ');
printf("\t");
}
printf("\n");
}
return 0;
}
@egcodes
Copy link
Author

egcodes commented May 5, 2017

screenshot from 2013-07-26 23-18-39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment