Question: in C++ write a program to ask user to Keep entering integer numbers through the keyboard. For end enter -1. Declare an empty stack and
in C++ write a program to ask user to Keep entering integer numbers through the keyboard. For end enter -1. Declare an empty stack and an empty queue. For every number that is even, enter it in the stack, otherwise enter it in the queue (odd numbers). Print both the stack and the queue. Then, pop one by one all the numbers from the stack and enter (enqueue) them in the queue. Again print both the stack and the queue.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
