summaryrefslogtreecommitdiff
path: root/chardiff_pre.c
blob: 6b682bfcfe93e371232ad0d20ed46a23a60f04a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>

int
main (int argc, char* argv[]) {
	char c;
	while ((c = getchar()) != EOF) {
		switch (c) {
			case '\n': puts("\\n"); break;
			case '\\': puts("\\\\"); break;
			default: printf("%c\n",c); break;
		}
	}
	return 0;
}