Converting numbers into roman numerals - problem from Chris Pine's book