Question: Data structure 2. Write a Java program that implements 2 stacks. Your program will ask users to Input odd and even numbers as the user
Data structure
2. Write a Java program that implements 2 stacks. Your program will ask users to Input odd and even numbers as the user wishes ( -1 to stop ), It will check if the number is even it will push it in to the 1st stack and if its odd it will push it in to the 2nd stack. Then the program will display back the elements in both stacks (even numbers) and (odd numbers) at the end of the program
Without use stack library
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
