11921 - Reorder   

Description

Given four integer numbers, please rearrange the value of them in increasing order.

Hint: You may design a function:

void cmp_and_swap(int *first, int *second){

/* if the first element is not smaller than the second one,

swap the first and second ones . */

}

Then call cmp_and_swap() in reorder(int* n1, int* n2, int* n3, int* n4);

Input

The input has four integer numbers num1, num2, num3, and num4.

Output

Print num1, num2, num3, num4 sequentially, and the output should be in increasing order.

Sample Input  Download

Sample Output  Download

Partial Judge Code

11921.c

Partial Judge Header

11921.h

Tags




Discuss