Question: C++ HW 108 -vector - Write a program that does the following 1.) Declare a vector named: values - Don't initialize it with values. 2.)
HW 108 -vector - Write a program that does the following 1.) Declare a vector named: values - Don't initialize it with values. 2.) Push these values at the back of the vector: 1 2 4 9 5 3.) Use a for loop to display all vector values. 4.) Then push a 3 on the front of the vector, to show the 3 at the beginning. / OUTPUT Vector: 1 24 95 Vector: 3 1 2 49 and then display the vector values again 1 2 49 5 5.) Now delete the 3 from the beginning, andVector: again display all values. Vector: 1 24 9 6.) Now remove the value at the back of the of There are 4 values. the vector (the 5), and display the values 7.) Lastly, use the size(0 function to display the number of values in the vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
