Originally Posted by Johnny87auxsm
Post your code here - or solve the problem yourself. People helping out here do not offer a free private coding service
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.