Skip to content

Instantly share code, notes, and snippets.

@knebekaizer
Created October 12, 2023 13:10
Show Gist options
  • Save knebekaizer/06e57f03ff0967174081d0f601457202 to your computer and use it in GitHub Desktop.
Save knebekaizer/06e57f03ff0967174081d0f601457202 to your computer and use it in GitHub Desktop.
terminal colors
#include <stdio.h>
int main(void)
{
int i, j, n;
for (i = 0; i < 11; i++) {
for (j = 0; j < 10; j++) {
n = 10 * i + j;
if (n > 108) break;
printf("\033[%dm %3d\033[m", n, n);
}
printf("\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment