Answer to Question #3776 in C++ for Fonda Ellis

Question #3776
Write a C++ program PEX3.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 ArrayStack implementation of the stack in the book.
PEX3.cpp;
StackA.cpp;
StackA.h;

Run:
Enter 20 integers:
5 13 25 16 2 4 5 17 457 88 1 9 26 55 100 75 36 8 10 35

Output:
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

I have completed all files except PEX.cpp I'm very lost and not sure how to complete it.
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS