View Code of Problem 78

#include<stdio.h>
#include<string.h>
main()
{
	int i;
	char a[10],b[10],c[10];
	gets(a);
	gets(b);
	gets(c);
	if(strcmp(a,b)>0)
	{
		if(strcmp(a,c)>0)
		{
			if(strcmp(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(strcmp(a,c)>0){
			puts(c);puts(a);puts(b);}
		else
		{
			if(strcmp(b,c)>0)
			{
				puts(a);puts(c);puts(b);
			}
			else
			{
				puts(a);puts(b);puts(c);
			}
		}
	}
}

Double click to view unformatted code.


Back to problem 78