#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> num{1, 2, 3, 4, 5};
// initial vector
cout << "Initial Vector: ";
for (int i : num) {
cout << i << " ";
}
// remove the last element
num.pop_back();
// final vector
cout << "
Updated Vector: ";
for (int i : num) {
cout << i << " ";
}
return 0;
}