Yep, I can, it's not hard. However I suspect this is in fact your homework, so I'm not going to do it for you. Have a go and see how far you get, then post your code when you get stuck.