program sub_enmu;
{$APPTYPE CONSOLE}
uses
  SysUtils;

//
type
    x = 1..12 ;                 {subrange type}
    c = ( jan,feb,mar,apr,may,jon,jol,ogst,oct, nov,des ); {enumerated type}

var

   x1 : x ;
   c1 : c ;
   y : integer;


procedure readmonth (var y : x);


   begin
   case y of

    1 : write ( 'jan' )  ;
    2 : write ( 'feb' )  ;
    3 : write ( 'mar' ) ;
    4 : write ( 'apr' ) ;
    5 : write ( 'may' ) ;
    6 : write ( 'jon' )  ;
    7 : write ( 'jol' )  ;
    8 : write ( 'ogst' ) ;
    9 : write ( 'sep' ) ;
    10 : write ( 'oct' )  ;
    11 : write ( 'nov' ) ;
    12 : write ( 'des' )

   end;

begin
  writeln ( ' enter amonth as num ' );
  readln (y);
  readmonth (y);
  write (y );
  readln
  end.

