Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input("Введите возраст Джона: "))
- if (n == 1) or (20 <= n <= 99 and n % 10 == 1):
- print("Джону",n,"год")
- elif (2 <= n <= 4) or ((20 <= n <= 99) and (n % 10 == 2 or n % 10 == 3 or n % 10 == 4)):
- print("Джону",n,"года")
- elif (5 <= n <= 20) or ((21 <= n <= 99) and (n % 10 == 0 or n % 10 == 5 or n % 10 == 6 or n % 10 == 7 or n % 10 == 8 or n % 10 == 9)):
- print("Джону",n,"лет")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement