18 lines
319 B
C
18 lines
319 B
C
|
#include <stdio.h>
|
||
|
|
||
|
int main() {
|
||
|
int c;
|
||
|
while ((c = getchar()) != EOF) {
|
||
|
if (c == '\t') {
|
||
|
printf("\\t");
|
||
|
} else if (c == '\b') {
|
||
|
printf("\\b"); // Needs literal backspace due to line buffer
|
||
|
} else if (c == '\\') {
|
||
|
printf("\\\\");
|
||
|
} else {
|
||
|
putchar(c);
|
||
|
}
|
||
|
}
|
||
|
return 0;
|
||
|
}
|