标签:
/*
输入三个整数x,y,z,请把这三个数由小到大输出。
*/
#include<stdio.h> int main(void) { int x = 0, y = 0, z = 0, temp = 0; scanf("%d%d%d", &x, &y, &z); if (x > y) { temp = x; x = y; y = temp; } if (y > z) { temp = y; y = z; z = temp; } if (x > y) { temp = x; x = y; y = temp; } printf("%d %d %d\n", x, y, z); return 0; }
标签:
原文地址:http://www.cnblogs.com/L3i4c5x6/p/4474603.html