| If you dislike my answer please explain which portion you need more information on. You asked "Is there any way to do this?" and I wrote you pseudocode that would accomplish your task.
I assumed, based on the simplicity of your question, that it was probably a homework assignment of some form.
You gave me negative reputation but you wanted more info, my answer was not wrong.
We can continue to work on this question if you're still interested. You can post what code you have if you want or tell me which of my 4 steps you're having trouble with. |