diff --git a/KNR C/ex1_10.c b/KNR C/ex1_10.c new file mode 100644 index 0000000..ed4b8c6 --- /dev/null +++ b/KNR C/ex1_10.c @@ -0,0 +1,29 @@ +#include + +int main(){ +int a = 0; + + while (a != EOF){ + + a = getchar(); + + if (a == '\b' || a == '\t' || a == '\\'){ + if (a == '\b'){ + printf("\\b"); + continue; + } + if (a == '\t'){ + printf("\\t"); + continue; + } else { + printf("\\"); + continue; + } + } else { + putchar (a); + } + } + + + return 0; +}