Josif_tepe

Untitled

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