This commit is contained in:
NaiJi ✨ 2024-04-18 03:46:30 +04:00
parent 39ac13eb36
commit b10de3206c
1 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
#include <stdio.h>
#define PRINT 0
#define SKIP 1
main()
{
int c;
int state;
while ((c = getchar()) != EOF)
{
state = PRINT;
if (c == '\t')
{
state = SKIP;
printf("\\t");
}
if (c == '\\')
{
state = SKIP;
printf("\\\\");
}
if (c == '\b')
{
state = SKIP;
printf("\\b");
}
if (state == PRINT)
{
putchar(c);
}
}
}