fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <vector>
  4. using namespace std;
  5.  
  6. int main() {
  7. std::vector<int> a(10);
  8. std::for_each(a.begin(), a.end(), [](int& a){ ++a; });
  9. std::for_each(a.begin(), a.end(), [](int a){ std::cout << a << std::endl; });
  10. std::sort(a.begin(), a.end(), [](int a, int b) { return a > b; });
  11.  
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0s 3232KB
stdin
Standard input is empty
stdout
1
1
1
1
1
1
1
1
1
1