Create a program that will create the following 3 sets for a
Solution
#include <iostream>
using namespace std;
int main() {
int input, remainder, even = 0, odd = 0;
int evenArray[even];
int oddArray[odd];
cout << \"This program accepts integers until you enter 0.\ Please enter a value: \";
cin >> input;
while (input != 0) {
remainder = input % 2;
if (remainder == 0) {
evenArray[even] = input;
even++;
}
else {
oddArray[odd] = input;
odd++;
}
cout << \"Enter another integer: \";
cin >> input;
}
cout << \"\ The number of evens is \" << even << \".\ \";
cout << \"The even values are: \";
for(int i = 0; i < even; i++) {
cout << evenArray[i] << \" \";
}
cout << endl;
cout << \"The number of odds is \" << odd << \".\ \";
cout << \"The odd values are: \";
for(int i = 0; i < odd; i++) {
cout << oddArray[i] << \" \";
}
}

