Don't post homework questions
Programmers are good at spotting homework questions; most of us have done them ourselves. Those questions are for you to work out, so that you will learn from the experience. It is OK to ask for hints, but not for entire solutions.
If you need help creating a program or assignment, please state specifically which parts of the program you are having trouble with. If you need help getting started, please let us know what the program needs to be able to do and we could take it from there.