Page 1 of 1

Part A Write a C++ program that will prompt the user for the size of a list of integers. Your program will: 1. dynamical

Posted: Tue Jul 12, 2022 8:20 am
by answerhappygod
Part A
Write a C++ program that will prompt the user for the size of alist of integers. Your program will:
1. dynamically allocate an array of that size and allow the userto enter the values.
2. Your program will then go through the list and copy all evennumbers to another dynamically allocated array. The functionalityof 1 and 2 need to be accomplished by separatefunctions.
part B
Redo question part A with these changes.
Instead of dynamically allocating an array to store the data,your program will will an STL array. Even numbers will also becopied to an STL array.
The input of the data and copying of even numbers will requirethe program to start at the beginning of the array and walk thorughthe values to the end. This must be done usingiterators