repl.it
@maniero/

SortThree.c

C

No description

fork
loading
Files
  • main.c
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>

int main (void) {
	int A, B, C;
	scanf("%d %d %d", &A, &B, &C);
	if (A < B && B < C) printf("%d %d %d", A, B, C);
	else if (C < B && B < A) printf("%d %d %d", C, B, A);
	else if (B < A && A < C) printf("%d %d %d", B, C, A);
	else if (A < C && C < B) printf("%d %d %d", A, C, B);
	else if (B < A && A < C) printf("%d %d %d", B, A, C);
	else if (C < A && A < B) printf("%d %d %d", C, A, B);
}

//https://pt.stackoverflow.com/q/55978/101