annotate letersort @ 6288:c7e7124e257e

<tswett> echo \'Your friends are strong. Take their help.\' > good/295
author HackBot
date Fri, 27 Nov 2015 01:40:21 +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;}}}