University of Iowa Computer Science Department

Project 09

Due Tuesday, April 26

Chapter 10, page 434, #13
Chapter 11, page 469, #9
Write a recursive method, called SayHello, that will print out the line "Hello, world" n times (i.e., n is the argument of the recursive method). The base case of the recursion (when n < 1) should print out the line "Goodbye cruel world". Prompt the user for a positive integer which will be passed into your method; repromt the user if a zero or a negative value is input. Also, handle any exceptions for illegally formatted data.

CLAS CRA ACM | ©2005 The University of Iowa | Modified: April 20, 2005, 07:58:49.