main() { int ch; while ((ch = read()) != 4) { if (ch > 0100 && ch < 0133) ch = ch + 040; if (ch == 015) continue; if (ch == 014) continue; if (ch == 011) { ch = 040040; write(040040); write(040040); } write(ch); } }
#include <stdio.h> int main(void) { int ch; while ((ch = getchar()) != -1) { if (ch > 0100 && ch < 0133) ch = ch + 040; if (ch == 015) continue; if (ch == 014) continue; // No need to handle tabstop specially putchar(ch); } }