As this is obviously a homework assignment, no guru here is going to write the code for you as this would be considered cheating. Please read http://forums.codeguru.com/showthrea...ork-assignment

Having said that, we are here to try to help you. The first step is produce a program design. Write down in English (or other natural language) the detailed steps that need to be done to satisfy the requirements. Once you have done this and are satisifed that following the produced steps produces the required outcome, then translate the program design into code. Once you have the program coded, then it can be tested and debugged against the design and the expected outcomes.

Design->code->test->debug

Once you have the design and you have attempted to produce the code from the design if you then would like some further feedback/guidance from us then post the code you have.