Creating an algorithm to solve Number Match - C#