Question

in c++ 3- Create a vector of integers and do the following: a- Create fillVector function...

in c++

3- Create a vector of integers and do the following:

a- Create fillVector function that uses the push_back method provided by the vector class to fill the vector with random numbers (use rand).

b- Now implement the void addNumbers(vector &data) method that adds 10 numbers to the data vector (use a for loop).

c- Create a new function void print_even(const vector& data) that prints all of the elements in the data vector that are stored at an even index (i.e. data.at(0), data.at(2), ...) . Use the at()method to access elements of a vector

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
in c++ 3- Create a vector of integers and do the following: a- Create fillVector function...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT