Skip to main content
Commonmark migration
Source Link

#C, 142 132 122 bytes

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.

#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.

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.

added 40 characters in body
Source Link
mIllIbyte
  • 1.2k
  • 8
  • 14

#C, 142 132132 122 bytes

10 bytes lighter thanks to @tucuxi!

b[200],k;main(c){for(;~c;isalpha;~c;isalnum(c)|c<58&c>47|c==95|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.

#C, 142 132 bytes

b[200],k;main(c){for(;~c;isalpha(c)|c<58&c>47|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.

#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.

added 8 characters in body
Source Link
mIllIbyte
  • 1.2k
  • 8
  • 14

#C, 142142 132 bytes

char*p,a[99],b[200],k;main(c){for(p=a;~c;isalpha;~c;isalpha(c)|c<58&c>47|c==95?k=kk&2?:1+(k|=!b[c|32]++,*p++=c,*p=0:(k&2&&printf?k&1?putchar("%s ",a32):0,p=a7:2),k=0k&4?putchar(c):0:(k&=1))c=getchar();}

Prints a trailing space after the last output word.Prints a trailing space after the last output word.

#C, 142 bytes

char*p,a[99],b[200],k;main(c){for(p=a;~c;isalpha(c)|c<58&c>47|c==95?k=k?:1+!b[c|32]++,*p++=c,*p=0:(k&2&&printf("%s ",a),p=a,k=0))c=getchar();}

Prints a trailing space after the last output word.

#C, 142 132 bytes

b[200],k;main(c){for(;~c;isalpha(c)|c<58&c>47|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.

Source Link
mIllIbyte
  • 1.2k
  • 8
  • 14
Loading