Q1 revised III

added a while loop for inappropriate parameters in main function, and
presented distribution as table