Professional Documents
Culture Documents
2
2
Read them
and mark the ones that are valid, considering the folowing rules:
1. Egg's colour:
1.1 Surrounded by one or more "@" or "#" (they don't have been the same).
1.2 It is written with lower case alphabeticals letters only.
1.3 Each colour shoud be minimum three letters only.
2. Amount:
2.1 Always positioned after the colour.
2.2 Between the colour and the amount thete could or could not be any other
characters. If there are, they must not be alphabetical letters or digits.
Otherwise, the colour-amount combinationis invalid.
2.3 Surrounded be one or more "/".
2.4 Contains only digits.
2.5 If the colour or the amount is not valid, we consider that the colour-amount
combination is not valid.
Next, you will have to print all the valid eggs like following: