Program for calculating number of days in a month