Have attempted to do try and code for the following situation but keep getting stuck and confusing myself.

Have got 4 numbers
first number has to be between 1 and 9 and if 0 is entered then there is a prompt that asks for the number to be between 1 and 9
Then it asks for the next 3 numbers
If all the numbers are the same then it asks the user to enter 4 new numbers
After this has been met the number is stored
The 4 numbers are then added together
If the number is even then 0 is added on and if it is odd then 1 is added to make it even
Then the origional number and new number is displayed
e.g. 4 3 4 8
4 3 4 8 1