Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numArr = []
- userNum = 1
- while userNum != 0:
- userNum = int(input("Введите число: "))
- numArr.append(userNum)
- sum = 0
- for i in numArr:
- if (i % 3 == 0) or (i % 4 == 0) or (i % 6 == 0):
- sum += i
- countMore5 = 0
- for i in numArr:
- if int(str(i)[-1]) >= 5:
- countMore5 += 1
- print(f"Сумма чисел кратных 3, 4 и 6: {sum}\n"
- f"Количество чисел, которые оканчиваются на цифру не менее 5: {countMore5}")
Add Comment
Please, Sign In to add comment