You must type in a list of numbers and make sure that in the list, there are no identical numbers; in other words, no number must appear twice in the list.
When entering a new number, make sure that the number does not exist in the list yet.
If it does, then display an error message to the user.
If the number does not yet exist, then add it to the list; also, make sure that the number entered is odd for a position where index is odd, and the number must be even at a position of even index.
See figure below.
Finally, display all numbers in the list.
For this assignment, it will be preferable to use a “while” loop or a “do{} while” loop.
The index counter must be incremented only when the number entered is valid!
Use the operator “%” to determine if a number is odd or even.

Student tries to write code to solve their problem. When they cant figure it out on their own, they go to message boards to get help finding where they went wrong.

The student is you, bro :(
Show Some Code

All I see is a homework assignment, which violates our rules. Please show us your honest attempt and ask an actual question.