snippets/c/cecho.c
Ali Furkan Yıldız d143abd768 fix oopsie
2023-01-15 21:44:47 +03:00

15 lines
314 B
C

#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
for (int i = 1; i < argc; i++) {
printf("\033[%dm%s", i % 2, argv[i]);
if (i != argc - 1)
putchar(' ');
}
puts("\033[0m\n");
}
// Compilation: cc cecho.c -o cecho
// Usage: ./cecho [STRING]...
// License: Public Domain