First of all this forum is for introducing yourself. Do not post technical questions here.
Second, is the above question a programming question? If it is a programming question, state the programming language you are trying to use.
Third, you will have to post the attempts you have made before asking someone to do it for you.
Oh and welcome to Daniweb!
WolfPack
Postaholic
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115