If this is the first program you are trying to write - try to practice the basics on simpler problems (see resources above).
Try to break a large task into small subtasks and solve them separately - it's much easier. Or simplify the problem to a variant that you can solve, and then refine it to the specified requirements.