annotate letersort @ 6254:2171053a45fd

<oerjan> learn \xea\x99\xae is the official Unicode character of #esoteric.
author HackBot
date Wed, 25 Nov 2015 08:42:23 +0000
parents a5ef8d072826
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5797
44ea2309c270 <enor> ` sed -i \'1i#include <stdio.h>\' letersort
HackBot
parents: 5795
diff changeset
1 #include <stdio.h>
5799
a5ef8d072826 <enor> ` sed -i \'s/\\*s-\\*c/\\*c-\\*s/\' letersort
HackBot
parents: 5797
diff changeset
2 int compare(char *s,char *c){return*c-*s;}int main(){char w[40];int c,i=0;while(
5794
4b799bff0ffd <enor> ` cat >>letersort <<<\'1){c=getchar();if(c<=32||c==EOF){qsort(w,i,1,compare);w[i]=0;printf("%s",w);if(c\'
HackBot
parents: 5793
diff changeset
3 1){c=getchar();if(c<=32||c==EOF){qsort(w,i,1,compare);w[i]=0;printf("%s",w);if(c
5795
2c18109d67c8 <enor> ` cat >>letersort <<<\'==EOF)break;putchar(c);i=0;}else{w[i++]=c;}}}\'
HackBot
parents: 5794
diff changeset
4 ==EOF)break;putchar(c);i=0;}else{w[i++]=c;}}}