View Code of Problem 78

# include<stdio.h>
# include<string.h>
int main(void)
{
    char a[10],b[10],c[10],t[10];
    gets(a);
    gets(b);
    gets(c);
    if(strcmp(a,b)<0)
    {
        strcpy(t,a);
        strcpy(a,b);
        strcpy(b,t);
    }
    if(strcmp(a,c)<0)
    {
        strcpy(t,a);
        strcpy(a,c);
        strcpy(c,t);
    }
    if(strcmp(b,c)<0)
    {
        strcpy(t,b);
        strcpy(b,c);
        strcpy(c,t);
    }
    puts(c);
    puts(b);
    puts(a);
    return 0;
}

Double click to view unformatted code.


Back to problem 78