A very simple self-learning program(by c++)