Added user input and complete result printing.