You expect us to do your homework? If you don't care enough to least try to patch together a program even if it gives you errors, why should we do it for you?
if it was a homework i can get it from my friend i am trying to learn something new and this is ours new topic and i wanted to see program before class is that realesed problem on you ?