View Code of Problem 78

#include<stdio.h>
#include<string.h>
int main()
{
char a[100],b[100],c[100];
gets(a);
gets(b);
gets(c);
if(strcmp(a,b)<0) 
{if(strcmp(b,c)<0) printf("%s\n%s\n%s\n",a,b,c);
 else{
if(strcmp(a,c)>0) printf("%s\n%s\n%s\n",c,a,b);
else printf("%s\n%s\n%s\n",a,c,b); 

}}
else 
{
if(strcmp(b,c)>0) printf("%s\n%s\n%s\n",c,b,a);
 
else 
 {if(strcmp(a,c)>0) printf("%s\n%s\n%s\n",b,c,a);
  else printf("%s\n%s\n%s\n",b,a,c);
 }
}



}

Double click to view unformatted code.


Back to problem 78