/* Copyright (C) 2011, 2013-2015 Luke Shumaker */ #include int main (int argc, char* argv[]) { int c; while ((c = getchar()) != EOF) { switch (c) { case '\n': puts("\\n"); break; case '\\': puts("\\\\"); break; default: printf("%c\n",c); break; } } return 0; }