수 정렬하기 1
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(void)
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
vector<int> vectors;
int input = 0;
cin >> input;
for (int i = 0; i < input; ++i)
{
int num = 0;
cin >> num;
vectors.push_back(num);
}
for (int i = 0; i < vectors.size(); ++i)
{
for (int j = 1 + i; j < vectors.size(); ++j)
{
if (vectors[i] > vectors[j])
{
int temp = vectors[j];
vectors[j] = vectors[i];
vectors[i] = temp;
}
}
}
for (int i = 0; i < vectors.size(); ++i)
{
cout << vectors[i] << "\n";
}
return 0;
}