Skip to content

Instantly share code, notes, and snippets.

@nkoneko
Created November 9, 2014 12:02
Show Gist options
  • Save nkoneko/28cabbddfce598655ee4 to your computer and use it in GitHub Desktop.
Save nkoneko/28cabbddfce598655ee4 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <vector>
#include <algorithm>
int main(void)
{
int i;
std::vector<int> v;
while (std::cin >> i)
{
v.push_back(i);
}
std::sort(
v.begin(),
v.end());
std::for_each(
v.begin(),
v.end(),
[](int j){std::cout << j
<< std::endl;});
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment