c_exercises/1-10.c

24 lines
357 B
C
Raw Normal View History

2022-11-05 17:52:17 -03:00
#include <stdio.h>
int main() {
int c;
while ((c=getchar()) != EOF){
if (c == '\t'){
putchar('\\');
putchar('t');
continue;
}
if (c == '\b'){
putchar('\\');
putchar('b');
continue;
}
if (c == '\\'){
putchar('\\');
putchar('\\');
continue;
}
putchar(c);
}
return 0;
}