Skip to main content
4 of 4
Commonmark migration

C, 142 132 122 bytes

10 bytes lighter thanks to @tucuxi!

b[200],k;main(c){for(;~c;isalnum(c)|c==95?k&2?:(k|=!b[c|32]++?k&1?putchar(32):0,7:2),k&4?putchar(c):0:(k&=1))c=getchar();}

Prints a trailing space after the last output word.

mIllIbyte
  • 1.2k
  • 8
  • 14