annotate letersort @ 5983:e9e46956a506

<oerjan> mk wisdom/welcome.sv//Hej och v\xc3\xa4lkommen till den internationella knutpunkten f\xc3\xb6r esoterisk programmeringsspr\xc3\xa5ksdesign och -drifts\xc3\xa4ttning! F\xc3\xb6r mer information, se v\xc3\xa5r wiki: <http://esolangs.org/>. (F\xc3\xb6r den andra sortens esoterism, pr\xc3\xb6va #esoteric p\xc3\xa5 EFnet eller DALnet.)
author HackBot
date Mon, 14 Sep 2015 17:49:06 +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;}}}