"manipulate the numbers and display messages depending on what numbers are present" is a bit too vague to understand what you need to do.
Please give more detailed requirements.