Skip to main content

6.8) Exercise 11


Write a program that:

  • Creates an initially empty vector of double values
  • Gets the user to specify how many values they want to store in the vector
  • Has a for loop that reads each value from the user and appends it to the vector
  • Displays the size of the vector to confirm that the required number of values have been added