3つの数のソートの問題
509 ワード
#include<iostream>
#include<stdio.h>
#include<string>
using namespace std;
int main()
{
int a, b, c, t;
cout << " " << endl;
cin >> a>>b>> c;
if (a < b)
{
t = a;
a = b;
b = t;
}
if (a < c)
{
t = a;
a = c;
c = a;
}
if (b < c)
{
t = b;
b = c;
c = b;
}
cout << " " << a<< b<< c << endl;
system("pause");
return 0;
}