Question: using C++ Create a program that uses vectors to store and display student grades. The program should: Store student test scores in a vector of
using C++
Create a program that uses vectors to store and display student grades. The program should:
- Store student test scores in a vector of integers. The number of students should be input by the user and used to control inputting items into the vector.
- Use the push_back member function to add the initial grades to the vector.
- Display the results from the initial vector
- Use the push_back member function to add 2 new elements to the vector.
- Use a loop to display all of the student grades in the vector using the size member function.
- Create a function that determines and prints the average of the student scores after receiving the vector and the size of the vector as arguments.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
