Правильно оформляет любые случаи, даже вне 120. # -*- coding: utf-8 -*- def get_word(n): no_third = n % 100 if no_third in range(11, 15): return "лет" last = no_third % 10 if last == 1: return "год" if last in range(2, 5): return "года" else: return "лет" iage = int(input("возраст: ")) iword = get_word(iage) print("{age} {word}".format(age=iage, word=iword))
stailwomen31
26.07.2022
Var a: array [1..20] of real; i: integer; m,s: real; begin s: =0; for i: =1 to 20 do read (a[i]); for i: =1 to 20 do s: =s+a[i]; m: =s/20; for i: =1 to 20 do if a[i]> =0 then a[i]: =m; for i: =1 to 20 do write (a[i],' '); end.