k&r; exercise 1.8 - use do-while when appropriate
k&r; exercise 1.9 - use do-while where appropriate