Question: Write in c++ thank you Integer numIn is read from input. Given the integer vector yearlyPrices with the size of numln, write a for loop


Write in c++
thank you
Integer numIn is read from input. Given the integer vector yearlyPrices with the size of numln, write a for loop to output the integers in the second half of yearlyPrices. Separate the integers with a comma followed by a space (","). Ex: If the input is 6 9296109127140155 then the output is: 127, 140, 155 Note: The vector size is always even. vector yearlyPrices; unsigned int i; int numIn; cin >> numIn; // Creates a vector of size numIn and initialize all values to yearlyPrices. resize(numIn); for (i=0;i> yearlyPrices.at(i); \} Your code goes here / cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
