finished Programming Challenge 3.17 (loan.cpp)