tenth exercise
This commit is contained in:
parent
4b6ce825b8
commit
c248c9a5b2
23
1-10.c
Normal file
23
1-10.c
Normal 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user