#include<stdio.h> #include<string.h> int main(){ char a[100],b[100],c[100]; gets(a); gets(b); gets(c); if(strcmpi(a,b)>0) { if(strcmpi(a,c)>0) { if(strcmpi(b,c)>0){ puts(c); puts(b); puts(a); } else { puts(b); puts(c); puts(a); } } else { puts(b); puts(a); puts(c); } } else { if(strcmpi(b,c)>0) { if(strcmpi(a,c)>0){ puts(c); puts(a); puts(b); } else { puts(a); puts(c); puts(b); } } else { puts(a); puts(b); puts(c); } } return 0; } /* Main.c: In function 'main': Main.c:5:2: warning: 'gets' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(a); ^ Main.c:6:2: warning: 'gets' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(b); ^ Main.c:7:2: warning: 'gets' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(c); ^ Main.c:8:2: warning: implicit declaration of function 'strcmpi' [-Wimplicit-function-declaration] if(strcmpi(a,b)>0) ^ /tmp/ccZ5ftoz.o: In function `main': Main.c:(.text+0x13): warning: the `gets' function is dangerous and should not be used. Main.c:(.text+0x4c): undefined reference to `strcmpi' Main.c:(.text+0x6f): undefined reference to `strcmpi' Main.c:(.text+0x95): undefined reference to `strcmpi' Main.c:(.text+0x144): undefined reference to `strcmpi' Main.c:(.text+0x163): undefined reference to `strcmpi' collect2: error: ld returned 1 exit status */ |
Double click to view unformatted code.