10007 - Swapping Two Numbers
#include <algorithm> #include <iostream> using namespace std; void Slove(int x, int y) { if (x > y) swap(x,y); cout << x << " " << y << endl; } int main(void) { int x, y; while ( cin >> x >> y && (x || y) ) Slove(x,y); return 0; }
swap()使いたかっただけ。。