CHALLENGE
5.6.1: Vector resize
ACTIVITY
453102.3197228.qx3zqy7
Start
Given the integer vector valElements with two elements and the input integer factorVal, resize valElements to increase the size of
the vector by factorVal times.
After resizing valElements, the new elements are initialized with the default value -1.
Ex: If the input is 4, then the output is:
Start 4 5 End
Start 4 5 -1 -1 -1 -1 -1 -1 End
Note: Assume that factorVal is a non-negative integer.
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> valElements (2);
int valElementsSize = valElements.size();
int factorVal;