Refactored printLargeNumber