exc/k&r/01-a-tutorial-introduction/01-10.c

18 lines
289 B
C

#include <stdio.h>
void main()
{
int c;
while ((c = getchar()) != EOF) {
if (c == '\t')
printf("\\t");
else if (c == '\b')
printf("\\b");
else if (c == '\\')
printf("\\\\");
else
putchar(c);
}
}