Advertisement
Josif_tepe

Untitled

Nov 18th, 2022
926
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4. using namespace std;
  5. int main()
  6. {
  7.     vector<int> v;
  8.     v.push_back(10);
  9.    
  10.     int x = 15;
  11.     v.push_back(x);
  12.  
  13.     for(int i = 0; i < v.size(); i++) {
  14.         cout << v[i] << " ";
  15.     }
  16.     sort(v.begin(), v.end());
  17.     return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement