Advertisement
DaniDori

Возраст

Feb 24th, 2023
1,314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.38 KB | None | 0 0
  1.  
  2.  
  3. program Hello;
  4. var a,b,c: integer;
  5. begin
  6.   read (a);
  7.     if ((a mod 100 >= 5) and (a mod 100 <= 20)) then
  8.         write ( ' вам ', a, ' лет ' )
  9.     else
  10.         case a mod 10 of
  11.             1: write ( ' вам ', a, ' год ' );
  12.             2..4: write ( ' вам ', a, ' года ' );
  13.             5..9, 0:write ( ' вам ', a, ' лет ' )
  14.         end;
  15. end.
  16.  
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement