Advertisement
Alex_Fomin

Untitled

Jan 12th, 2016
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.23 KB | None | 0 0
  1. function Declension(x: byte): string;
  2. begin
  3.   if x in [11..14] then Result := 'лет'
  4.   else
  5.     case x mod 10 of
  6.       1: Result := 'год';
  7.       2..4: Result := 'года';
  8.       0, 5..9: Result := 'лет';
  9.     end;
  10. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement