summaryrefslogtreecommitdiff
path: root/chardiff_pre.c
blob: 8a68d543622d9d608644d1f636005157f211e379 (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;
		}
	}
}