Seems simple enough. What have you got so far and where are you stuck?

If the problem is you haven't got the first clue where to start then I would advise going on a C course to learn the language first.