printBasedOnNumber