% robust and compact way to do things   month4.m
try
  monthlist= ['January  '; 'February ';'March    '; 'April    '; 'May      '; 
              'June     '; 'July     ';'August   '; 'September'; 'October  '; 
              'November '; 'December ' ];
  month = input('input a number 1-12 for a month ');
  month_name =monthlist(month,1:end);
  fprintf(' Month is %s '); disp(month_name); fprintf(' \n');
catch
  fprintf('\n\nException! Month value   %d given as input  is not in the range 1-12\n',month);
end
