Write a C++ program PEX5.cpp that reads a sequence of 20 integers, pushing all of the even integers onto one stack and all the odd integers onto the other. Output the contents of each stack by popping elements until its empty. Remember to use the STL < stack >.

Run:
Enter 20 integers:
5 13 25 16 2 4 5 17 457 88 1 9 26 55 100 75 36 8 10 35
Even integers in reverse order:
10 8 36 100 26 88 4 2 16
Odd integers in reverse order:
35 75 55 9 1 457 17 5 25 13 5
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.