annotate letersort @ 6161:ab5aa5ee2a4f

<boily> le/rn portmanteau/\xc2\xabPortmanteau\xc2\xbb is the French spelling of \xe2\x80\x9cport man toe\xe2\x80\x9d.
author HackBot
date Fri, 30 Oct 2015 00:54:13 +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;}}}