Write a java program that read list of integer numbers from input user. If the number is even add it into evenList. Otherwise add to oddList. At the end of the code, display the elements of the odd and even numbers list respectively with ascending order. Display your output in the following format: (): [Note: The code must use list and iterator] Input: 230-15 8 22 -11 6-7 18 Output: Odd List (4): -15 -11 -7 3 Even List (6): 0 2 6 8 18 22

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter16: Searching, Sorting And Vector Type
Section: Chapter Questions
Problem 23SA
icon
Related questions
Question
Odd Even Number Using List
CLOSE
START
Tags: List iterator
Write a java program that read list of integer numbers from input user. If the number is even add it into evenList.
Otherwise add to odd List.
At the end of the code, display the elements of the odd and even numbers list respectively with ascending order.
Display your output in the following format:
<Odd or Even list> (<Size_of_list >): <the elements of the list separated by a space>
[Note: The code must use list and iterator]
Input:
230-15 8 22-11 6-7 18
Output:
Odd List (4): -15-11-73
Even List (6): 0 2 6 8 18 22
Transcribed Image Text:Odd Even Number Using List CLOSE START Tags: List iterator Write a java program that read list of integer numbers from input user. If the number is even add it into evenList. Otherwise add to odd List. At the end of the code, display the elements of the odd and even numbers list respectively with ascending order. Display your output in the following format: <Odd or Even list> (<Size_of_list >): <the elements of the list separated by a space> [Note: The code must use list and iterator] Input: 230-15 8 22-11 6-7 18 Output: Odd List (4): -15-11-73 Even List (6): 0 2 6 8 18 22
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning