solutions to problems from http://zufallstee.blogspot.com/p/simple-programming-problems.html