It's not difficult, but we're not going to write the code for you. How far have you got and where are you stuck?