Add example program and solution for problem 1-12.