#include void main(void) { int ch = 0, prev; while (prev=ch, (ch=getchar()) != EOF) { putchar( ch=='\n' && prev != '\n' ? '^' : ch); } }