Write a C++ program that will prompt the user for the size of a list of integers. Your program will 1. dynamically allocate an array of that size and allow the user to enter the values. 2. Your program will then go through the list and copy all even numbers to another dynamically allocated array. The functionality of 1 and 2 need to be accomplished by separate functions.
3.) Write a C++ program that will prompt the user for the size of a list of integers. Your program will 1. dynamically allocate an array of that size and allow the user to enter the values. 2. Your program will then go through the list and copy all even numbers to another dynamically allocated array. The functionality of 1 and 2 need to be accomplished by separate functions.
4.) Redo question number 3 with these changes. Instead of dynamically allocating an array to store the data, your program will will an STL array. Even numbers will also be copied to an STL array. The input of the data and copying of even numbers will require the program to start at the beginning of the array and walk thorugh the values to the end. This must be done using iterators.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images