Just thought I'd give a bit of advice to all the people posting on here who are new to C. I am new also and I know that if you post your code on here (in the proper way) then people will rush to help you.
However, I have had a hard time doing assignments set for me and I have found that solving a problem with the least amount of help gives you an enormous sense of achievement. Having some kind expert on this board write the program for you will get you good marks but when you get a job you may find yourself out of your depth.
What I am basically trying to say is read your notes a good few times and try examples. Draw flow charts detailing exactly how the program must logically flow. Then start your programming, perhaps consulting examples from the web or text book.
I guarantee you will feel better if you achieve a good mark from something you do on your own.
And please, read the rules for this forum before you post and avoid annoying the regulars!