completed problem 18--my first recursion program!!!