Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- total_sum = 0
- while True:
- num = int(input("Введите натуральное число (для завершения введите 0): "))
- if num == 0:
- break
- elif num % 6 == 0 and num % 10 == 4:
- total_sum += num
- print("Сумма чисел, кратных 6 и оканчивающихся на 4:", total_sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement