Created
June 11, 2022 21:03
-
-
Save apaz-cli/22d8d9087aecc26e1717f1b32dc15289 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 <limits.h> | |
| #include <stdio.h> | |
| #define EN "\x1b[36m" | |
| #define BX "\x1b[31m" | |
| #define RS "\x1b[0m" | |
| #define LT "\x1b[33m" | |
| int main(void) { | |
| puts(BX "======================== ASCII TABLE ========================"); | |
| for (char i = 32;; i++) { | |
| char v[2]; | |
| v[0] = i; | |
| v[1] = '\0'; | |
| printf(BX "|" RS " " EN "%3d" RS " " EN "-" RS " " LT "%s" RS " ", i, v); | |
| if (i == CHAR_MAX) { | |
| puts(RS " " BX "|"); | |
| break; | |
| } | |
| if (i % 6 == 1) { | |
| puts(BX "|"); | |
| } | |
| } | |
| putchar('\n'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment