Created
May 13, 2026 05:26
-
-
Save jeandrek/098dd1f1f30ff527f8b135782966f59d to your computer and use it in GitHub Desktop.
For piping program output
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> | |
| #include <stdlib.h> | |
| int | |
| main(void) | |
| { | |
| int c; | |
| for (;;) { | |
| c = getchar(); | |
| if (c == -1) return 0; | |
| if (c == '\n') | |
| printf("\033[1;3%dm", rand() % 8); | |
| putchar(c); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment