Break the problem down - I would recommend translating the assignment into a step-by-step list of requirements (for instance, one step might be 'get values from user'). Once you know what is required...