tenth exercise
This commit is contained in:
parent
4b6ce825b8
commit
c248c9a5b2
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue