Looks like homework to me.
Why don't you try it and see what you can come up with, or explain what problem you are facing