tenth exercise

This commit is contained in:
celso 2022-11-05 17:52:17 -03:00
parent 4b6ce825b8
commit c248c9a5b2
1 changed files with 23 additions and 0 deletions

23
1-10.c Normal file
View File

@ -0,0 +1,23 @@
#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;
}