Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ HW 108 -vector - Write a program that does the following 1.) Declare a vector named: values - Don't initialize it with values. 2.)
C++
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started