Perhaps if you show the code you have tried to write we can help.
Take a look at the guidelines below to have a better chance of getting answers.